These are chat archives for PHPOffice/PhpSpreadsheet

9th
Feb 2018
Frédéric Delaunay
@Dfred
Feb 09 14:04
is there a way to filter in all issues closed by stale bot? I wonder how many like #179 remain..
Frédéric Delaunay
@Dfred
Feb 09 15:41
I was looking for the corresponding label. Didn't see the stale one. Is this done by the bot itself ?
Frédéric Delaunay
@Dfred
Feb 09 15:48
thanks for the info Adrien
Adrien Crivelli
@PowerKiKi
Feb 09 15:48
and maybe more info there: https://probot.github.io/apps/stale/
Frédéric Delaunay
@Dfred
Feb 09 15:49
Actually, I'd love to create a PR for all my bugfixes, but I need to update the tests. Is there a bit of doc about this?
Adrien Crivelli
@PowerKiKi
Feb 09 15:50
about how to write tests ? nope
Frédéric Delaunay
@Dfred
Feb 09 15:51
so can I make sure my PR passes?
Adrien Crivelli
@PowerKiKi
Feb 09 15:51
we recently added functional tests that should be useful to ensure that a feature can both be written and read in multiple format: https://github.com/PHPOffice/PhpSpreadsheet/tree/develop/tests/PhpSpreadsheetTests/Functional
it depends what kind of things you are fixing
for formulas, there are lot of example that you can copy/paste from
Olivier Stern
@olivierstern
Feb 09 15:59
Hello, I'm working with a spreadsheet of around 26 cols and 28k rows. I have an excess memory warning, so I wondered how I could implement a cache system. I read the documentation, but I can't find a working example to copy. If anyone could help me ;)
It's not possible to write an excel file piece by piece without reloading the whole document in memory, is it ?
Frédéric Delaunay
@Dfred
Feb 09 16:01
@PowerKiKi have a look at my fork. I have a few bug fixes, as well as some additional features.
last time I issued a PR, it got refused for a lack of test, which is totally fine and I'd like to address that efficiently
Adrien Crivelli
@PowerKiKi
Feb 09 16:04
Olivier Stern
@olivierstern
Feb 09 16:06
Yes but I thought there would be an example of MyCustomPsr16Implementation() in the sample files but cannot find any.
Adrien Crivelli
@PowerKiKi
Feb 09 16:06
@Dfred it really depends on what part you are touching, the best would be to create a PR for whatever thing you want to get merged and we can discuss it in details over there
Olivier Stern
@olivierstern
Feb 09 16:07
It's not possible to add rows to an excel sheet without reloading all the spreadsheet into memory or is it ?
Frédéric Delaunay
@Dfred
Feb 09 16:07
@PowerKiKi that's why I created a branch for each feature or bugfix
so I can submit a PR for each branch
the branch develop-merges is only to test all of those branches together, so I won't submit a PR for that one.
Adrien Crivelli
@PowerKiKi
Feb 09 16:09
@olivierstern not it is not possible. You are right, there is no sample for cache, but the code in the docs is really all there is to it. The magic thing being Settings::setCache()
@Dfred yes, you can submit a PR for each and I will take a look at them, but it might take a few days because I don't have much spare time nowadays. You could start with your "favorite" branch first maybe, so we don't do everything at once. But that's up to you
Olivier Stern
@olivierstern
Feb 09 16:12
Thank you @PowerKiKi. I will try to install the APCu package
Adrien Crivelli
@PowerKiKi
Feb 09 16:13
@olivierstern APCu is only one of many possibilities, be sure to consider which one best fit your needs
Olivier Stern
@olivierstern
Feb 09 16:15
My need is to export a database with 30k rows and 26cols into an excel spreadsheet. What would you recommend ?
Frédéric Delaunay
@Dfred
Feb 09 16:15
@PowerKiKi do you want us to try again with this one? PHPOffice/PhpSpreadsheet#179
that was on Nov 28, 2017
Adrien Crivelli
@PowerKiKi
Feb 09 16:17
@olivierstern I don't know ^^'
Olivier Stern
@olivierstern
Feb 09 16:17
Ok I'll try
Frédéric Delaunay
@Dfred
Feb 09 16:18
@PowerKiKi actually this is the thread: PHPOffice/PhpSpreadsheet#249
Adrien Crivelli
@PowerKiKi
Feb 09 16:20
ok, did you get a change to get familiar with PHPunit since then ?
Frédéric Delaunay
@Dfred
Feb 09 16:20
unfortunately no, I was busy fixing other bugs
I recently issued another one related to the Xls Reader
Adrien Crivelli
@PowerKiKi
Feb 09 16:21
when coming to a new project, I usually check the .travis.yml it contains a lot of information on how to run tests
you can see there, that in our case, it is very simple:
  1. composer install
  2. ./vendor/bin/phpunit
Frédéric Delaunay
@Dfred
Feb 09 16:22
and I'm finding new discrepancies between data correctly parsed by Xls and Xlsx readers..
oh I did that
no big deal here.
it's more about the usage
Adrien Crivelli
@PowerKiKi
Feb 09 16:23
things like self::assertEquals() and so on ?
Frédéric Delaunay
@Dfred
Feb 09 16:24
I stopped at trying to write a new test and getting a test result
that remained obscure, although I admit I did not spend more than an hour. I was expecting to find a crash course somewhere but that did not happen.
Adrien Crivelli
@PowerKiKi
Feb 09 16:26
mhh, I am not sure exactly with what you need help
Frédéric Delaunay
@Dfred
Feb 09 16:26
firing tests for instance
Adrien Crivelli
@PowerKiKi
Feb 09 16:27
that would be ./vendor/bin/phpunit
with optionnal arguments such as --filter to test only a few things
are you looking for a watch mechanism ?
Frédéric Delaunay
@Dfred
Feb 09 16:27
let's not waste your own time with this. I'll carry on my learning about it.
Adrien Crivelli
@PowerKiKi
Feb 09 16:29
I'll have to go for now, but feel free to "try" things in your PR we can always clean up after reaching a good enough state
Frédéric Delaunay
@Dfred
Feb 09 16:32
I'll do that, thanks for the kickstart(er)