php-remote-storage icon indicating copy to clipboard operation
php-remote-storage copied to clipboard

tracker issue before 2.x release

Open fkooman opened this issue 3 years ago • 4 comments

I did a bunch of refactoring and cleaning up, but there is more to do, it is hard to create a list now as that list will only grow when going through the code :-)

Just a start, when tackling each of these, I'm sure a bunch more issues will fall out. In no particular order:

  • [ ] update Request class and do proper input validation
  • [ ] update documentation, match reality
    • [ ] document how to set up Apache|Nginx + php-fpm on modern Debian/Ubuntu
  • [ ] add more unit tests
  • [x] remove fkooman/secookie dependency (native PHP sessions are good enough for php-remote-storage)
  • [ ] remove twig dependency (PHP is a template language)
  • [ ] remove yaml dependency, either use PHP directly or ini format
  • [x] make config parsing more robust
  • [ ] store users in database, not in config file
  • [ ] enable foreign keys for SQLite (disabled by default)
  • [ ] figure out whether CORS headers are all set correctly now
  • [ ] provide DEB and RPM packages for easy installation
  • [ ] fix parsing of Origin/redirect_uri/client_id (see #68)

fkooman avatar Feb 01 '22 20:02 fkooman

@raucao

fkooman avatar Feb 01 '22 20:02 fkooman

Great! :clap:

Some of these seem more like feature wishes than necessities to me.

  • make config parsing more robust
  • store users in database, not in config file
  • enable foreign keys for SQLite (disabled by default)

These are all nice improvements, but couldn't they be made in a 2.1 version?

  • provide DEB and RPM packages for easy installation

The package would use the actual tagged release, so I think these arguably great (yet external) features would come after the 2.0 release anyway, no?

raucao avatar Feb 01 '22 20:02 raucao

Some of these seem more like feature wishes than necessities to me.

Yeah, sure.

Tightening static code analysis tools also helped a lot in improving code, this was done in last commit... could be that stuff was broken by improving code, I test with localhost. The sync seems broken somehow, but I am not sure why. My old favorite drinks are gone. They are still on disk, didn't take time to debug.

This problem is actually triggered by the app... thought it would be unimportant, but it seems to be :-)

ERROR: PossiblyFalseOperand - src/Path.php:110:36 - Left operand cannot be falsable, got false|int (see https://psalm.dev/162)
        return substr($this->p, 0, strrpos($this->p, '/') + 1);

fkooman avatar Feb 01 '22 22:02 fkooman

Interesting PHP issue: if you name your drink e.g. '12345' everything will break because of this.

fkooman avatar Feb 01 '22 22:02 fkooman