351 Commits

Author SHA1 Message Date
Adrien Loison
13eb5f0560 Merge branch 'cell_styling' of git://github.com/madflow/spout into madflow-cell_styling 2017-10-16 23:37:26 +02:00
madflow
0ab053dc6e (chore) remove hhvm from the test grid 2017-10-13 18:50:10 +02:00
madflow
823fbdb43f php-cs-fixer fix 2017-10-04 13:32:54 +02:00
madflow
8739bce698 Merge branch 'develop_3.0' into cell_styling 2017-10-04 13:24:38 +02:00
Adrien Loison
28c1bea28c Code style should not follow Yoda style 2017-10-04 00:53:05 +02:00
madflow
78f7036a7c fix row from array 2017-09-29 18:03:48 +02:00
madflow
2797052c54 make tests pass again 2017-09-29 14:47:33 +02:00
madflow
6971a793ef merge, resolve conflicts 2017-09-29 11:22:39 +02:00
Adrien Loison
b968513cb9 Fix code style 2017-09-06 00:33:43 +02:00
Adrien Loison
740fcfb8c1 Fix code before applying PHP CS Fixer 2017-09-06 00:33:43 +02:00
Adrien Loison
554ebf987b Setup PHP CS fixer
- Add PHP CS Fixer as a dev dependencies.
- Add PHP CS Fixer cache file to gitignore/gitattributes
- Add custom code style config
- Update TravisCI config to check code style
2017-09-06 00:33:43 +02:00
Adrien Loison
668c10a30d Introduce Managers for readers
Some helper classes were more managers than helpers...
2017-08-27 03:56:17 +02:00
Adrien Loison
61f2addefa Favor object creation in factories (#459)
Instead of passing factories in the constructors and let objects call the factory method, create all dependencies directly in the factories.
2017-08-27 02:40:39 +02:00
Adrien Loison
4ec3a21170 Random DI improvements (#458)
* Add random DI improvements

Fixing things that were previously missed

* Split InternalFactory into Manager and Helper factories
2017-08-27 01:44:20 +02:00
Adrien Loison
b7e46740ce Refactor readers for better di (#457)
* Refactor readers to get a proper DI

Similar to what was done with writers, readers also needed to be updated to match the new way of doing things.
This commits promotes a better DI (factories, injection through constructors).

* Escapers should not be singletons

Instead, they should be proper object that can be injected where needed.
2017-08-27 00:01:17 +02:00
madflow
d4e99f74c9 allow setting style to null 2017-08-01 20:15:23 +02:00
madflow
edccd21dbd some cleanup todos 2017-08-01 13:01:12 +02:00
madflow
99c327ba84 rename method 2017-07-31 21:10:48 +02:00
madflow
169dc262ab typo in method name 2017-07-31 21:09:16 +02:00
madflow
fe53d4a1a2 make all tests pass 2017-07-31 20:58:20 +02:00
madflow
7c7376e151 make row tests pass 2017-07-30 21:17:33 +02:00
madflow
23de4b4117 first shot an row RowManager and make CSV tests pass 2017-07-30 21:09:55 +02:00
madflow
968ca198cc reworked AbstractWriter, doc updates 2017-07-30 17:47:01 +02:00
madflow
cb8ba1d2a4 remove *withStyle methods from interface, docs cleanup 2017-07-30 17:26:58 +02:00
madflow
46c8e77cea first changes 2017-07-20 21:22:46 +02:00
madflow
97cdd0c627 implement cell styling and row objects 2017-07-20 21:22:46 +02:00
madflow
33c28dbf6c introduced row objects 2017-07-20 21:22:46 +02:00
madflow
4d6437fa77 merge master, resolve conflicts (#447) 2017-07-13 09:52:15 +02:00
Adrien Loison
3bb4fd3d48 Move Sheet to Common/Entity (#438)
... and introduce a SheetManager
2017-05-30 16:49:07 +02:00
Adrien Loison
30366e6a5d Inject ZipHelper through constructor (#437) 2017-05-30 15:19:05 +02:00
Adrien Loison
762dd1573a Inject GlobalFunctionsHelper through constructor for Writers (#436) 2017-05-30 14:37:38 +02:00
Adrien Loison
7ec0f565fd Rename SharedStringsHelper to SharedStringsManager (#435) 2017-05-30 14:11:18 +02:00
Adrien Loison
cc9a0b526b Refactory Writer Styles to match new code organization (#433)
Decomposed old StyleHelper into StyleManager, StyleRegistry and StyleMerger.
2017-05-30 13:05:18 +02:00
Adrien Loison
238756ab6e Move Style classes into Common folder (#432) 2017-05-30 00:56:50 +02:00
Adrien Loison
c4e25a168e Move entities and managers back to Common (#431) 2017-05-29 23:28:10 +02:00
Adrien Loison
878c4a9c8b Rename Factory folder to Creator (#430) 2017-05-29 23:10:24 +02:00
Adrien Loison
cebffbe80c Move Cell and Options to Entity folder (#429) 2017-05-29 22:51:12 +02:00
Adrien Loison
69b091b37c Move OptionManager from Common/Manager to Manager (#428) 2017-05-29 22:34:25 +02:00
Adrien Loison
bc17311f5f Refactor writers for better DI (#427)
This commit is a big refactor that improves the code organization.
It focuses on how dependencies are injected into the different classes. This is now done via some factories.

Also, the code is now built around entities (data model that only exposes getters and setters), managers (used to manage an entity) and helpers (used by the managers to perform some specific tasks).

The refactoring is not fully complete, as some dependencies are still hidden...
2017-05-29 22:18:40 +02:00
Adrien Loison
a366d0d0af Introduce an options manager for all writers (#423)
This will improve the management of options and simplify some methods' signatures.
This commit will also help moving the code to a better state regarding Dependency Injection.
2017-05-24 13:17:50 +02:00
madflow
f9d8ad8be3 bump phpunit to the latest supported release, travis setup, ignore composer.lock (#419) 2017-05-22 10:39:03 +02:00
Adrien Loison
80553c6c52 Bump min PHP version to 5.6 (#415) 2017-05-05 15:14:47 +02:00
madflow
4acd9ad087 Cell value objects (#383)
* first stab at cell objects, #182
* removed comment parameter, streamlined cell detection, more tests #182
* shorter constant names, missing isFormula() #182
* first batch of changes #182
* documentation #182
2017-05-01 12:09:24 +02:00
Adrien Loison
4e6db6a8a1 Update copyright year (#412) 2017-04-28 11:17:41 +02:00
Adrien Loison
048105461c Fix shared strings XML Entities auto decode (#411)
When converting an XMLReader node to a SimpleXMLElement, the conversion would automatically decode the XML entities. This resulted in a double decode.
For example: """ was converted to """ when imported into a SimpleXMLElement and was again converted into " (quote).

This commit changes the way the XLSX Shared Strings file is processed. It also changes the unescaping logic for both XLSX and ODS.

Finally, it removes any usage of the SimpleXML library (yay!).
2017-04-28 02:27:33 +02:00
Adrien Loison
1eb01a3d2a Use constants instead of arbitrary strings in SheetHelper (#407) 2017-04-15 23:52:48 +02:00
Adrien Loison
9f80ece73f Minor fixes for tests (#406) 2017-04-15 23:33:50 +02:00
Adrien Loison
7f8b95b2f3 Expose Sheet::isActive() to provide info about the last active sheet (#405) 2017-04-15 21:40:19 +02:00
Adrien Loison
4a65466b61 Prevent error when close() called while writer already closed (#402) v2.7.2 2017-03-28 15:07:48 +02:00
Adrien Loison
742780613a Do not add space between text nodes (#401) 2017-03-28 14:36:15 +02:00