diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 33c7113cd..95eb97d61 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -45,3 +45,17 @@ Note : If you have large portions of text, use [Github's Gist service](https://g ## You want to fix a bug or to add a feature Please fork wallabag and work with **the master branch**. + +## Run Tests and PHP formatter + +All pull requests need to pass the tests and the code needs match the style guide. + +To run the tests locally run: + +- when testing using Docker: `docker-compose run --rm php make test` +- otherwise: `make test` + +To run the PHP formatter: + +- when testing using Docker: `docker-compose run --rm php bin/php-cs-fixer fix` +- otherwise: `php bin/php-cs-fixer fix` diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4c4a44dc2..0aa2ba703 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -22,15 +22,10 @@ updates: - j0k3r - tcitworld - Kdecherf - labels: - - Ready for review ignore: - - dependency-name: doctrine/doctrine-migrations-bundle + - dependency-name: lcobucci/jwt versions: - - "> 1.3.2" - - dependency-name: friendsofsymfony/user-bundle - versions: - - "> 2.0.2" + - ">= 4.2.0" - package-ecosystem: github-actions directory: "/" schedule: diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 2cb383ec0..03ee1aee2 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -49,3 +49,6 @@ jobs: - name: "Run TwigCS" run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr" + + - name: "Run ergebnis/composer-normalize" + run: "composer normalize --dry-run --no-check-lock" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 44e10c59d..2f3f10c03 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -32,6 +32,7 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" database: - "sqlite" - "mysql" @@ -79,3 +80,74 @@ jobs: - name: "Run PHPUnit" run: "php bin/simple-phpunit -v" + + phpunit_no_prefix: + name: "PHP ${{ matrix.php }} using ${{ matrix.database }} without prefix" + runs-on: "ubuntu-20.04" + services: + rabbitmq: + image: rabbitmq:3-alpine + ports: + - 5672:5672 + redis: + image: redis:6-alpine + ports: + - 6379:6379 + + strategy: + fail-fast: true + matrix: + php: + - "8.2" + database: + - "sqlite" + - "mysql" + - "pgsql" + + steps: + - name: "Checkout" + uses: "actions/checkout@v3" + with: + fetch-depth: 2 + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php }}" + coverage: none + tools: pecl + extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy + ini-values: "date.timezone=Europe/Paris" + + - name: "Remove database prefix" + run: | + pip install --user yq + yq -Y --in-place '.parameters.database_table_prefix = ""' app/config/parameters.yml.dist + + - name: "Setup MySQL" + if: "${{ matrix.database == 'mysql' }}" + run: | + sudo systemctl start mysql.service + sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test" + + - name: "Setup PostgreSQL" + if: "${{ matrix.database == 'pgsql' }}" + run: | + sudo systemctl start postgresql + sudo -u postgres psql -d template1 -c "CREATE USER wallabag WITH PASSWORD 'wallabagrocks' CREATEDB" + createdb -h localhost -p 5432 -U wallabag wallabag_test + pg_isready -d wallabag_test -h localhost -p 5432 -U wallabag + + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v2" + with: + composer-options: "--optimize-autoloader --prefer-dist" + + - name: "Prepare database" + run: "make prepare DB=${{ matrix.database }}" + + - name: "Prepare fixtures" + run: "make fixtures" + + - name: "Run PHPUnit" + run: "php bin/simple-phpunit -v" diff --git a/.github/workflows/dependabot-automerge-js.yml b/.github/workflows/dependabot-automerge-js.yml index b68b3b65b..68b856e19 100644 --- a/.github/workflows/dependabot-automerge-js.yml +++ b/.github/workflows/dependabot-automerge-js.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.3.5 + uses: dependabot/fetch-metadata@v1.6.0 with: github-token: '${{ secrets.GITHUB_TOKEN }}' - name: Approve and merge minor updates diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 2194f49e6..d0c8d4a6f 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -40,11 +40,5 @@ jobs: with: composer-options: "--optimize-autoloader --prefer-dist" - - name: "Validate Core translations" - run: "php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v" - - - name: "Validate CraueConfig translations" - run: "php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v" - - - name: "Validate User translations" - run: "php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v" + - name: "Validate translations" + run: "php bin/console lint:yaml translations -v" diff --git a/CHANGELOG.md b/CHANGELOG.md index e41170e67..73ae842c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,131 @@ # Changelog +## [2.6.2](https://github.com/wallabag/wallabag/tree/2.6.2) +[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.1...2.6.2) + +### Fixes +* Fix mass action input on dark theme by @simounet https://github.com/wallabag/wallabag/pull/6673 +* Fix undefined variable by @nicosomb https://github.com/wallabag/wallabag/pull/6672 +* Fix table name in migration by @nicosomb https://github.com/wallabag/wallabag/pull/6653 + +### Technical stuff +* Add a new build to test when no database table prefix are defined by @j0k3r https://github.com/wallabag/wallabag/pull/6731 +* Keep escaped table name while migrating by @Glandos https://github.com/wallabag/wallabag/pull/6710 +* Remove twofactor_auth parameter by @nicosomb https://github.com/wallabag/wallabag/pull/6723 +* ApiDoc: Add response description to UserRestController by @caspermeijn https://github.com/wallabag/wallabag/pull/6684 +* ApiDoc: Add response description to WallabagRestController by @caspermeijn https://github.com/wallabag/wallabag/pull/6102 +* Skip migration if the table was already renamed by @gramakri https://github.com/wallabag/wallabag/pull/6678 + +### Meta +* Document how to run tests and formatter for new contributors by @caspermeijn https://github.com/wallabag/wallabag/pull/6685 +* Add link to wallabag ecosystem resources by @nicosomb https://github.com/wallabag/wallabag/pull/6700 + +## [2.6.1](https://github.com/wallabag/wallabag/tree/2.6.1) +[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.0...2.6.1) + +### Fixes +* Do not autoload fixtures by @j0k3r https://github.com/wallabag/wallabag/pull/6648 +* Add confirmation alert when deleting articles from list view by @nicosomb https://github.com/wallabag/wallabag/pull/6644 + +## [2.6.0](https://github.com/wallabag/wallabag/tree/2.6.0) +[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.4...2.6.0) + +### Features +* Add tag deletion from tags list by @nicosomb https://github.com/wallabag/wallabag/pull/5861 +* Add support of mass action to tag entries by @kdecherf https://github.com/wallabag/wallabag/pull/5838 +* Mass action interface by @Simounet https://github.com/wallabag/wallabag/pull/6547 +* Empty space on the top bar used for more add url toggle clickable target by @Simounet https://github.com/wallabag/wallabag/pull/6612 +* Add new setting to show / hide articles thumbnails by @nicosomb https://github.com/wallabag/wallabag/pull/6609 + +### Fixes +* Add prefix for tag slugs by @kdecherf https://github.com/wallabag/wallabag/pull/6226 +* Fix open all external links in new tab in Config by @wyntonfranklin https://github.com/wallabag/wallabag/pull/6256 +* Fix dark theme for pre HTML tags by @Simounet https://github.com/wallabag/wallabag/pull/6495 +* Fix dark mode top bar contrast by @Simounet https://github.com/wallabag/wallabag/pull/6510 +* Dark mode contrast improved by @Simounet https://github.com/wallabag/wallabag/pull/6512 +* Fix dark mode URL add input color by @Simounet https://github.com/wallabag/wallabag/pull/6525 +* Fix round reading time in export by @mart-e https://github.com/wallabag/wallabag/pull/6545 +* Fix images downloading with numeric HTML entity by @Simounet https://github.com/wallabag/wallabag/pull/6563 +* Fix DownloadImages not following redirections by @Simounet https://github.com/wallabag/wallabag/pull/6562 +* Fix auto dark theme detection flickering by @Simounet https://github.com/wallabag/wallabag/pull/6584 +* Fix RSS feed_route not set by @Simounet https://github.com/wallabag/wallabag/pull/6606 +* Add flash message when we try to add too much tags by @nicosomb https://github.com/wallabag/wallabag/pull/6607 +* Changed default value for domain_name parameter by @nicosomb https://github.com/wallabag/wallabag/pull/6616 +* Improved tags display by @Simounet https://github.com/wallabag/wallabag/pull/6613 +* Fix mousetrap enter issue by @Simounet https://github.com/wallabag/wallabag/pull/6624 +* Fix duplicate tags creation when assigning search results to tag by @nicosomb https://github.com/wallabag/wallabag/pull/6629 + +### Meta +* Removed Carrot & Scuttle share by @nicosomb https://github.com/wallabag/wallabag/pull/6047 +* Remove old, not so maintained and buggy baggy theme by @nicosomb https://github.com/wallabag/wallabag/pull/4332 +* Remove Scrutinizer badge by @j0k3r https://github.com/wallabag/wallabag/pull/6179 +* Add mention to unofficial linux client by @imhemish https://github.com/wallabag/wallabag/pull/6203 + +### Technical stuff +* Remove SensioDistributionBundle by @yguedidi https://github.com/wallabag/wallabag/pull/5761 +* Back to latest composer version by @yguedidi https://github.com/wallabag/wallabag/pull/5810 +* Clean composer.lock after SensioDistributionBundle removal by @yguedidi https://github.com/wallabag/wallabag/pull/5839 +* Remove transitive dependencies by @yguedidi https://github.com/wallabag/wallabag/pull/5784 +* Register missed commands by @yguedidi https://github.com/wallabag/wallabag/pull/5928 +* Extend right FOSRestBundle controller class by @yguedidi https://github.com/wallabag/wallabag/pull/5929 +* Remove PHP-CS-Fixer deprecations by @yguedidi https://github.com/wallabag/wallabag/pull/5914 +* Upgrade FOSUserBundle to 2.1 by @yguedidi https://github.com/wallabag/wallabag/pull/5782 +* Add TwigCS by @yguedidi https://github.com/wallabag/wallabag/pull/5759 +* Use FQCN as service name by @yguedidi https://github.com/wallabag/wallabag/pull/5748 +* Migrate to new template reference notation by @yguedidi https://github.com/wallabag/wallabag/pull/5758 +* Migrate from old colon notation to FQCN by @yguedidi https://github.com/wallabag/wallabag/pull/5943 +* Use autowiring by @yguedidi https://github.com/wallabag/wallabag/pull/5946 +* Use FQCN to fetch services by @yguedidi https://github.com/wallabag/wallabag/pull/5951 +* Run tests without memory limit by @yguedidi https://github.com/wallabag/wallabag/pull/5953 +* Import used classes by @yguedidi https://github.com/wallabag/wallabag/pull/5952 +* Rework command tests by @yguedidi https://github.com/wallabag/wallabag/pull/5954 +* Switch to Swagger for api documentation by @caspermeijn https://github.com/wallabag/wallabag/pull/6062 +* Remove some deprecation by @j0k3r https://github.com/wallabag/wallabag/pull/6085 +* Remove deprecated options from FOSRest by @j0k3r https://github.com/wallabag/wallabag/pull/6095 +* Remove LiipThemeBundle by @j0k3r https://github.com/wallabag/wallabag/pull/6097 +* Upgrade PHPStan and move to level 2 with baseline by @j0k3r https://github.com/wallabag/wallabag/pull/6098 +* Upgrade to Symfony 4.4 by @j0k3r https://github.com/wallabag/wallabag/pull/6099 +* Update to FOSUserBundle 3.1 by @j0k3r https://github.com/wallabag/wallabag/pull/6136 +* Update to scheb/2fa-bundle by @j0k3r https://github.com/wallabag/wallabag/pull/6144 +* Upgrade to Twig 3 by @j0k3r https://github.com/wallabag/wallabag/pull/6151 +* Move translations files to /translations by @j0k3r https://github.com/wallabag/wallabag/pull/6153 +* Fix EventDispatcher & events by @j0k3r https://github.com/wallabag/wallabag/pull/6154 +* Replace SwiftMailer by Symfony Mailer by @j0k3r https://github.com/wallabag/wallabag/pull/6150 +* Remove ContainerAwareCommand from commands by @j0k3r https://github.com/wallabag/wallabag/pull/6152 +* Update all Doctrine deps by @j0k3r https://github.com/wallabag/wallabag/pull/6143 +* Update PagerFanta by @j0k3r https://github.com/wallabag/wallabag/pull/6145 +* Move to controller as a service by @j0k3r https://github.com/wallabag/wallabag/pull/6159 +* Add RabbitMQConsumerTotalProxy to lazy RabbitMQ services for messages by @j0k3r https://github.com/wallabag/wallabag/pull/6166 +* Properly handle json_array type removal by @j0k3r https://github.com/wallabag/wallabag/pull/6171 +* Fix database_path in Docker env by @j0k3r https://github.com/wallabag/wallabag/pull/6174 +* Docker: database_table_prefix may be configured from environment by @fcatt https://github.com/wallabag/wallabag/pull/6196 +* Update annotations to OpenApi 3 by @caspermeijn https://github.com/wallabag/wallabag/pull/6182 +* Fix public folder for Symfony 4+ by @kdecherf https://github.com/wallabag/wallabag/pull/6217 +* Fix API allowed_registration by @caspermeijn https://github.com/wallabag/wallabag/pull/6315 +* Enable PHP 8.2 in CI by @j0k3r https://github.com/wallabag/wallabag/pull/6469 +* Fix/build stylelint error by @Simounet https://github.com/wallabag/wallabag/pull/6586 + +## [2.5.4](https://github.com/wallabag/wallabag/tree/2.5.4) + [Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.3...2.5.4) + +### Security fixes +* Fix adding tag to entries from other people by @j0k3r in https://github.com/wallabag/wallabag/pull/6290 +* Fix XSS on username on share page by @j0k3r in https://github.com/wallabag/wallabag/pull/6288 +* Fix CSRF on user deletion by @j0k3r in https://github.com/wallabag/wallabag/pull/6289 + +### Meta +* Fix release script by @j0k3r in https://github.com/wallabag/wallabag/pull/6275 + +## [2.5.3](https://github.com/wallabag/wallabag/tree/2.5.3) + [Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.2...2.5.3) + +### Security fixes +* Fix GHSA-qwx8-mxxx-mg96 https://github.com/wallabag/wallabag/commit/0f7460dbab9e29f4f7d2944aca20210f828b6abb by @Kdecherf, thanks to @bAuh0lz +* Fix GHSA-mrqx-mjc4-vfh3 https://github.com/wallabag/wallabag/commit/5ac6b6bff9e2e3a87fd88c2904ff3c6aac40722e by @Kdecherf, thanks to @bAuh0lz + +### Meta +* Update deps before 2.5.3 by @j0k3r in https://github.com/wallabag/wallabag/pull/6241 + ## [2.5.2](https://github.com/wallabag/wallabag/tree/2.5.2) [Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.1...2.5.2) diff --git a/GNUmakefile b/GNUmakefile index 7a7f60ed2..1fcf581aa 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -40,7 +40,7 @@ ifdef DB endif -php bin/console doctrine:database:drop --force --env=test php bin/console doctrine:database:create --env=test - php bin/console doctrine:migrations:migrate --no-interaction --env=test + php bin/console doctrine:migrations:migrate --no-interaction --env=test -vv fixtures: ## Load fixtures into database php bin/console doctrine:fixtures:load --no-interaction --env=test diff --git a/README.md b/README.md index 074205612..376d99be0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # wallabag ![CI](https://github.com/wallabag/wallabag/workflows/CI/badge.svg) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/wallabag/wallabag/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wallabag/wallabag/?branch=master) [![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/wallabag/wallabag) [![Donation Status](https://img.shields.io/liberapay/goal/wallabag.svg?logo=liberapay)](https://liberapay.com/wallabag/donate) [![Translation status](https://hosted.weblate.org/widgets/wallabag/-/svg-badge.svg)](https://hosted.weblate.org/engage/wallabag/?utm_source=widget) @@ -18,6 +17,8 @@ You can install it on your own server, or you can create an account on [wallabag * Android app: [wallabag/android-app](https://github.com/wallabag/android-app) * iOS app: [wallabag/ios-app](https://github.com/wallabag/ios-app) * Browser extension: [wallabag/wallabagger](https://github.com/wallabag/wallabagger) +* GNOME (Linux) app: [read-it-later](https://gitlab.gnome.org/World/read-it-later) (not maintained by this project) +* All resources about wallabag ecosystem are listed here: https://github.com/wallabag/wallabag/wiki/wallabag-ecosystem ## Documentation diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index 1334592c0..30dc85411 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -17,9 +17,8 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li #### Create a new release on GitHub - [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `master` branch or any appropriate branch (for instance backports). -- Update nginx config to change the redirect rule for `https://wllbg.org/latest-v2-package` & `http://wllbg.org/latest-v2` (they both redirect to the asset of the GitHub release) +- Update [website](https://github.com/wallabag/website) to change MD5 sum and create the release blog post (based on the changelog). - Update Dockerfile https://github.com/wallabag/docker (and create a new tag) -- Update wallabag.org website (downloads, MD5 sum, releases and new blog post) - Put the next patch version suffixed with `-dev` in `app/config/wallabag.yml` (`wallabag_core.version`) - Drink a :beer:! diff --git a/app/AppKernel.php b/app/AppKernel.php index 63d74e915..812f778fa 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -13,7 +13,6 @@ class AppKernel extends Kernel new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), - new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new FOS\RestBundle\FOSRestBundle(), @@ -35,6 +34,7 @@ class AppKernel extends Kernel new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(), new Http\HttplugBundle\HttplugBundle(), new Sentry\SentryBundle\SentryBundle(), + new Twig\Extra\TwigExtraBundle\TwigExtraBundle(), // wallabag bundles new Wallabag\CoreBundle\WallabagCoreBundle(), diff --git a/app/DoctrineMigrations/Version20160401000000.php b/app/DoctrineMigrations/Version20160401000000.php index 9417935b7..a61d6a5ac 100644 --- a/app/DoctrineMigrations/Version20160401000000.php +++ b/app/DoctrineMigrations/Version20160401000000.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20160401000000 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized'); @@ -164,7 +164,7 @@ SQL } } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql("DROP TABLE {$this->getTable('craue_config_setting')}"); $this->addSql("DROP TABLE {$this->getTable('tagging_rule')}"); diff --git a/app/DoctrineMigrations/Version20160410190541.php b/app/DoctrineMigrations/Version20160410190541.php index 5b6d83dce..c00087875 100644 --- a/app/DoctrineMigrations/Version20160410190541.php +++ b/app/DoctrineMigrations/Version20160410190541.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20160410190541 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -24,14 +24,14 @@ class Version20160410190541 extends WallabagMigration $sharePublic = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_public'"); if (false === $sharePublic) { $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_public', '1', 'entry')"); } } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $entryTable->dropColumn('uid'); diff --git a/app/DoctrineMigrations/Version20160812120952.php b/app/DoctrineMigrations/Version20160812120952.php index f5f90850d..1d7e7f89d 100644 --- a/app/DoctrineMigrations/Version20160812120952.php +++ b/app/DoctrineMigrations/Version20160812120952.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20160812120952 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); $this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.'); @@ -31,7 +31,7 @@ class Version20160812120952 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); diff --git a/app/DoctrineMigrations/Version20160911214952.php b/app/DoctrineMigrations/Version20160911214952.php index 4d7e0f7ee..223cd45a0 100644 --- a/app/DoctrineMigrations/Version20160911214952.php +++ b/app/DoctrineMigrations/Version20160911214952.php @@ -10,12 +10,12 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20160911214952 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $redis = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis'"); if (false === $redis) { $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_redis', 0, 'import')"); @@ -24,7 +24,7 @@ class Version20160911214952 extends WallabagMigration $rabbitmq = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq'"); if (false === $rabbitmq) { $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('import_with_rabbitmq', 0, 'import')"); @@ -33,7 +33,7 @@ class Version20160911214952 extends WallabagMigration $this->skipIf(false !== $rabbitmq && false !== $redis, 'It seems that you already played this migration.'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_redis';"); $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'import_with_rabbitmq';"); diff --git a/app/DoctrineMigrations/Version20160916201049.php b/app/DoctrineMigrations/Version20160916201049.php index fc5e04aea..d1f93ebfa 100644 --- a/app/DoctrineMigrations/Version20160916201049.php +++ b/app/DoctrineMigrations/Version20160916201049.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20160916201049 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $configTable = $schema->getTable($this->getTable('config')); @@ -20,7 +20,7 @@ class Version20160916201049 extends WallabagMigration $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'pocket_consumer_key';"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $configTable = $schema->getTable($this->getTable('config')); $configTable->dropColumn('pocket_consumer_key'); diff --git a/app/DoctrineMigrations/Version20161001072726.php b/app/DoctrineMigrations/Version20161001072726.php index 497cb2a16..02d29fb79 100644 --- a/app/DoctrineMigrations/Version20161001072726.php +++ b/app/DoctrineMigrations/Version20161001072726.php @@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161001072726 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); @@ -24,9 +24,8 @@ class Version20161001072726 extends WallabagMigration WHERE TABLE_NAME = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND CONSTRAINT_NAME LIKE 'FK_%' AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'" ); - $query->execute(); - foreach ($query->fetchAll() as $fk) { + foreach ($query->fetchAllAssociative() as $fk) { $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']); } break; @@ -42,9 +41,8 @@ class Version20161001072726 extends WallabagMigration AND conrelid::regclass::text = '" . $this->getTable('entry_tag', WallabagMigration::UN_ESCAPED_TABLE) . "' AND n.nspname = 'public';" ); - $query->execute(); - foreach ($query->fetchAll() as $fk) { + foreach ($query->fetchAllAssociative() as $fk) { $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP CONSTRAINT ' . $fk['conname']); } break; @@ -65,9 +63,8 @@ class Version20161001072726 extends WallabagMigration AND COLUMN_NAME = 'entry_id' AND TABLE_SCHEMA = '" . $this->connection->getDatabase() . "'" ); - $query->execute(); - foreach ($query->fetchAll() as $fk) { + foreach ($query->fetchAllAssociative() as $fk) { $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']); } break; @@ -84,9 +81,8 @@ class Version20161001072726 extends WallabagMigration AND n.nspname = 'public' AND pg_get_constraintdef(c.oid) LIKE '%entry_id%';" ); - $query->execute(); - foreach ($query->fetchAll() as $fk) { + foreach ($query->fetchAllAssociative() as $fk) { $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP CONSTRAINT ' . $fk['conname']); } break; @@ -95,7 +91,7 @@ class Version20161001072726 extends WallabagMigration $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ADD CONSTRAINT FK_annotation_entry FOREIGN KEY (entry_id) REFERENCES ' . $this->getTable('entry') . ' (id) ON DELETE CASCADE'); } - public function down(Schema $schema) + public function down(Schema $schema): void { throw new SkipMigrationException('Too complex ...'); } diff --git a/app/DoctrineMigrations/Version20161022134138.php b/app/DoctrineMigrations/Version20161022134138.php index d993363c6..4547d5fe3 100644 --- a/app/DoctrineMigrations/Version20161022134138.php +++ b/app/DoctrineMigrations/Version20161022134138.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161022134138 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); @@ -38,7 +38,7 @@ class Version20161022134138 extends WallabagMigration $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE `name` `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); diff --git a/app/DoctrineMigrations/Version20161024212538.php b/app/DoctrineMigrations/Version20161024212538.php index fa028ac0b..f7cb254c6 100644 --- a/app/DoctrineMigrations/Version20161024212538.php +++ b/app/DoctrineMigrations/Version20161024212538.php @@ -12,7 +12,7 @@ class Version20161024212538 extends WallabagMigration { private $constraintName = 'IDX_user_oauth_client'; - public function up(Schema $schema) + public function up(Schema $schema): void { $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); @@ -29,7 +29,7 @@ class Version20161024212538 extends WallabagMigration ); } - public function down(Schema $schema) + public function down(Schema $schema): void { $clientsTable = $schema->getTable($this->getTable('oauth2_clients')); diff --git a/app/DoctrineMigrations/Version20161031132655.php b/app/DoctrineMigrations/Version20161031132655.php index ec58cb2a8..ba95d1002 100644 --- a/app/DoctrineMigrations/Version20161031132655.php +++ b/app/DoctrineMigrations/Version20161031132655.php @@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161031132655 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $images = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled'"); $this->skipIf(false !== $images, 'It seems that you already played this migration.'); $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('download_images_enabled', 0, 'misc')"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_images_enabled';"); } diff --git a/app/DoctrineMigrations/Version20161104073720.php b/app/DoctrineMigrations/Version20161104073720.php index e0289ec9a..375f7bc5c 100644 --- a/app/DoctrineMigrations/Version20161104073720.php +++ b/app/DoctrineMigrations/Version20161104073720.php @@ -12,7 +12,7 @@ class Version20161104073720 extends WallabagMigration { private $indexName = 'IDX_entry_created_at'; - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.'); @@ -20,7 +20,7 @@ class Version20161104073720 extends WallabagMigration $entryTable->addIndex(['created_at'], $this->indexName); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.'); diff --git a/app/DoctrineMigrations/Version20161106113822.php b/app/DoctrineMigrations/Version20161106113822.php index 5a4831f41..cc1e5e718 100644 --- a/app/DoctrineMigrations/Version20161106113822.php +++ b/app/DoctrineMigrations/Version20161106113822.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161106113822 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $configTable = $schema->getTable($this->getTable('config')); @@ -22,7 +22,7 @@ class Version20161106113822 extends WallabagMigration ]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $configTable = $schema->getTable($this->getTable('config')); diff --git a/app/DoctrineMigrations/Version20161117071626.php b/app/DoctrineMigrations/Version20161117071626.php index bafb70da1..e832f6675 100644 --- a/app/DoctrineMigrations/Version20161117071626.php +++ b/app/DoctrineMigrations/Version20161117071626.php @@ -10,12 +10,12 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161117071626 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $share = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark'"); if (false === $share) { $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('share_unmark', 0, 'entry')"); @@ -24,7 +24,7 @@ class Version20161117071626 extends WallabagMigration $unmark = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url'"); if (false === $unmark) { $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('unmark_url', 'https://unmark.it', 'entry')"); @@ -33,7 +33,7 @@ class Version20161117071626 extends WallabagMigration $this->skipIf(false !== $share && false !== $unmark, 'It seems that you already played this migration.'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_unmark';"); $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'unmark_url';"); diff --git a/app/DoctrineMigrations/Version20161118134328.php b/app/DoctrineMigrations/Version20161118134328.php index 2298447a2..ab3e0068a 100644 --- a/app/DoctrineMigrations/Version20161118134328.php +++ b/app/DoctrineMigrations/Version20161118134328.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161118134328 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -22,7 +22,7 @@ class Version20161118134328 extends WallabagMigration ]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php index e628f0582..3e85ac1b5 100644 --- a/app/DoctrineMigrations/Version20161122144743.php +++ b/app/DoctrineMigrations/Version20161122144743.php @@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161122144743 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $access = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access'"); $this->skipIf(false !== $access, 'It seems that you already played this migration.'); $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('restricted_access', 0, 'entry')"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'restricted_access';"); } diff --git a/app/DoctrineMigrations/Version20161122203647.php b/app/DoctrineMigrations/Version20161122203647.php index 27fe7d2c4..c3a2f5433 100644 --- a/app/DoctrineMigrations/Version20161122203647.php +++ b/app/DoctrineMigrations/Version20161122203647.php @@ -18,7 +18,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161122203647 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $userTable = $schema->getTable($this->getTable('user')); @@ -28,7 +28,7 @@ class Version20161122203647 extends WallabagMigration $userTable->dropColumn('credentials_expired'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $userTable = $schema->getTable($this->getTable('user')); diff --git a/app/DoctrineMigrations/Version20161128084725.php b/app/DoctrineMigrations/Version20161128084725.php index e22e842f1..7eb6e60a6 100644 --- a/app/DoctrineMigrations/Version20161128084725.php +++ b/app/DoctrineMigrations/Version20161128084725.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161128084725 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $configTable = $schema->getTable($this->getTable('config')); $this->skipIf($configTable->hasColumn('list_mode'), 'It seems that you already played this migration.'); @@ -18,7 +18,7 @@ class Version20161128084725 extends WallabagMigration $configTable->addColumn('list_mode', 'integer', ['notnull' => false]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $configTable = $schema->getTable($this->getTable('config')); $configTable->dropColumn('list_mode'); diff --git a/app/DoctrineMigrations/Version20161128131503.php b/app/DoctrineMigrations/Version20161128131503.php index 2a34d448f..29032953a 100644 --- a/app/DoctrineMigrations/Version20161128131503.php +++ b/app/DoctrineMigrations/Version20161128131503.php @@ -16,7 +16,7 @@ class Version20161128131503 extends WallabagMigration 'expires_at' => 'datetime', ]; - public function up(Schema $schema) + public function up(Schema $schema): void { $userTable = $schema->getTable($this->getTable('user')); @@ -26,7 +26,7 @@ class Version20161128131503 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $userTable = $schema->getTable($this->getTable('user')); diff --git a/app/DoctrineMigrations/Version20161214094402.php b/app/DoctrineMigrations/Version20161214094402.php index 0240f5994..eb3be2250 100644 --- a/app/DoctrineMigrations/Version20161214094402.php +++ b/app/DoctrineMigrations/Version20161214094402.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20161214094402 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -32,7 +32,7 @@ class Version20161214094402 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20161214094403.php b/app/DoctrineMigrations/Version20161214094403.php index c6003cb35..84ad4b815 100644 --- a/app/DoctrineMigrations/Version20161214094403.php +++ b/app/DoctrineMigrations/Version20161214094403.php @@ -12,7 +12,7 @@ class Version20161214094403 extends WallabagMigration { private $indexName = 'IDX_entry_uid'; - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf($entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.'); @@ -20,7 +20,7 @@ class Version20161214094403 extends WallabagMigration $entryTable->addIndex(['uid'], $this->indexName); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf(false === $entryTable->hasIndex($this->indexName), 'It seems that you already played this migration.'); diff --git a/app/DoctrineMigrations/Version20170127093841.php b/app/DoctrineMigrations/Version20170127093841.php index d8eb34e57..b4e887f21 100644 --- a/app/DoctrineMigrations/Version20170127093841.php +++ b/app/DoctrineMigrations/Version20170127093841.php @@ -13,7 +13,7 @@ class Version20170127093841 extends WallabagMigration private $indexStarredName = 'IDX_entry_starred'; private $indexArchivedName = 'IDX_entry_archived'; - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf($entryTable->hasIndex($this->indexStarredName) && $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.'); @@ -22,7 +22,7 @@ class Version20170127093841 extends WallabagMigration $entryTable->addIndex(['is_archived'], $this->indexArchivedName); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf(false === $entryTable->hasIndex($this->indexStarredName) && false === $entryTable->hasIndex($this->indexArchivedName), 'It seems that you already played this migration.'); diff --git a/app/DoctrineMigrations/Version20170327194233.php b/app/DoctrineMigrations/Version20170327194233.php index 268f8cdea..b7ba9382e 100644 --- a/app/DoctrineMigrations/Version20170327194233.php +++ b/app/DoctrineMigrations/Version20170327194233.php @@ -10,12 +10,12 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170327194233 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $scuttle = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle'"); $this->skipIf(false !== $scuttle, 'It seems that you already played this migration.'); @@ -23,7 +23,7 @@ class Version20170327194233 extends WallabagMigration $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('scuttle_url', 'http://scuttle.org', 'entry')"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'share_scuttle';"); $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'scuttle_url';"); diff --git a/app/DoctrineMigrations/Version20170405182620.php b/app/DoctrineMigrations/Version20170405182620.php index 798c72af9..5b17bf8db 100644 --- a/app/DoctrineMigrations/Version20170405182620.php +++ b/app/DoctrineMigrations/Version20170405182620.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170405182620 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -27,7 +27,7 @@ class Version20170405182620 extends WallabagMigration ]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20170407200919.php b/app/DoctrineMigrations/Version20170407200919.php index d9fff6c38..140bb826a 100644 --- a/app/DoctrineMigrations/Version20170407200919.php +++ b/app/DoctrineMigrations/Version20170407200919.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170407200919 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf(!$entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); @@ -18,7 +18,7 @@ class Version20170407200919 extends WallabagMigration $entryTable->dropColumn('is_public'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf($entryTable->hasColumn('is_public'), 'It seems that you already played this migration.'); diff --git a/app/DoctrineMigrations/Version20170420134133.php b/app/DoctrineMigrations/Version20170420134133.php index 2bf053462..e2b329f4b 100644 --- a/app/DoctrineMigrations/Version20170420134133.php +++ b/app/DoctrineMigrations/Version20170420134133.php @@ -10,17 +10,17 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170420134133 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures';"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $downloadPictures = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'download_pictures'"); $this->skipIf(false !== $downloadPictures, 'It seems that you already played this migration.'); diff --git a/app/DoctrineMigrations/Version20170501115751.php b/app/DoctrineMigrations/Version20170501115751.php index a879cd441..1a34d3354 100644 --- a/app/DoctrineMigrations/Version20170501115751.php +++ b/app/DoctrineMigrations/Version20170501115751.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170501115751 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf($schema->hasTable($this->getTable('site_credential')), 'It seems that you already played this migration.'); @@ -31,7 +31,7 @@ class Version20170501115751 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $schema->dropTable($this->getTable('site_credential')); } diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php index ddc894a65..d4c8172ad 100644 --- a/app/DoctrineMigrations/Version20170510082609.php +++ b/app/DoctrineMigrations/Version20170510082609.php @@ -17,7 +17,7 @@ class Version20170510082609 extends WallabagMigration 'email_canonical', ]; - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); @@ -26,7 +26,7 @@ class Version20170510082609 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); diff --git a/app/DoctrineMigrations/Version20170511115400.php b/app/DoctrineMigrations/Version20170511115400.php index 9a89cfb8b..33f262d13 100644 --- a/app/DoctrineMigrations/Version20170511115400.php +++ b/app/DoctrineMigrations/Version20170511115400.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170511115400 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -21,7 +21,7 @@ class Version20170511115400 extends WallabagMigration ]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20170511211659.php b/app/DoctrineMigrations/Version20170511211659.php index d0752bafe..f299fe275 100644 --- a/app/DoctrineMigrations/Version20170511211659.php +++ b/app/DoctrineMigrations/Version20170511211659.php @@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170511211659 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { switch ($this->connection->getDatabasePlatform()->getName()) { case 'sqlite': @@ -62,7 +62,7 @@ EOD } } - public function down(Schema $schema) + public function down(Schema $schema): void { $tableName = $this->getTable('annotation'); diff --git a/app/DoctrineMigrations/Version20170602075214.php b/app/DoctrineMigrations/Version20170602075214.php index f72839b20..f13651d52 100644 --- a/app/DoctrineMigrations/Version20170602075214.php +++ b/app/DoctrineMigrations/Version20170602075214.php @@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170602075214 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $apiUserRegistration = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'"); $this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.'); $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';"); } diff --git a/app/DoctrineMigrations/Version20170606155640.php b/app/DoctrineMigrations/Version20170606155640.php index 099e53296..4e0f2fffd 100644 --- a/app/DoctrineMigrations/Version20170606155640.php +++ b/app/DoctrineMigrations/Version20170606155640.php @@ -11,19 +11,21 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170606155640 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { + $this->skipIf(!$schema->hasTable($this->getTable('craue_config_setting')), 'Table already renamed'); + $apiUserRegistration = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'"); $this->skipIf(false === $apiUserRegistration, 'It seems that you already played this migration.'); $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'wallabag_url'"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('wallabag_url', 'wallabag.me', 'misc')"); } diff --git a/app/DoctrineMigrations/Version20170719231144.php b/app/DoctrineMigrations/Version20170719231144.php index 7a9731d43..27baf1c42 100644 --- a/app/DoctrineMigrations/Version20170719231144.php +++ b/app/DoctrineMigrations/Version20170719231144.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170719231144 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); @@ -21,13 +21,12 @@ class Version20170719231144 extends WallabagMigration GROUP BY LOWER(label) HAVING COUNT(*) > 1' ); - $dupTags->execute(); - foreach ($dupTags->fetchAll() as $duplicates) { + foreach ($dupTags->fetchAllAssociative() as $duplicates) { $label = $duplicates['lower_label']; // Retrieve all duplicate tags for a given tag - $tags = $this->connection->executeQuery(' + $tags = $this->connection->query(' SELECT id FROM ' . $this->getTable('tag') . ' WHERE LOWER(label) = :label @@ -41,7 +40,7 @@ class Version20170719231144 extends WallabagMigration $newId = null; $ids = []; - foreach ($tags->fetchAll() as $tag) { + foreach ($tags->fetchAllAssociative() as $tag) { // Ignore the first tag as we use it as the new reference tag if ($first) { $first = false; @@ -86,7 +85,7 @@ class Version20170719231144 extends WallabagMigration ); } - public function down(Schema $schema) + public function down(Schema $schema): void { throw new SkipMigrationException('Too complex ...'); } diff --git a/app/DoctrineMigrations/Version20170824113337.php b/app/DoctrineMigrations/Version20170824113337.php index dc20f6d9c..7526752f1 100644 --- a/app/DoctrineMigrations/Version20170824113337.php +++ b/app/DoctrineMigrations/Version20170824113337.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20170824113337 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -21,7 +21,7 @@ class Version20170824113337 extends WallabagMigration ]); } - public function postUp(Schema $schema) + public function postUp(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf(!$entryTable->hasColumn('starred_at'), 'Unable to add starred_at colum'); @@ -34,7 +34,7 @@ class Version20170824113337 extends WallabagMigration ); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20171008195606.php b/app/DoctrineMigrations/Version20171008195606.php index 60d8777f4..a082a91b0 100644 --- a/app/DoctrineMigrations/Version20171008195606.php +++ b/app/DoctrineMigrations/Version20171008195606.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20171008195606 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); @@ -26,7 +26,7 @@ class Version20171008195606 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); diff --git a/app/DoctrineMigrations/Version20171105202000.php b/app/DoctrineMigrations/Version20171105202000.php index 5313a3368..ce5e333cb 100644 --- a/app/DoctrineMigrations/Version20171105202000.php +++ b/app/DoctrineMigrations/Version20171105202000.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20171105202000 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -21,7 +21,7 @@ class Version20171105202000 extends WallabagMigration ]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20171120163128.php b/app/DoctrineMigrations/Version20171120163128.php index a6d126a50..96cbe3b42 100644 --- a/app/DoctrineMigrations/Version20171120163128.php +++ b/app/DoctrineMigrations/Version20171120163128.php @@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20171120163128 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $storeArticleHeaders = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers'"); $this->skipIf(false !== $storeArticleHeaders, 'It seems that you already played this migration.'); $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('store_article_headers', '0', 'entry')"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'store_article_headers';"); } diff --git a/app/DoctrineMigrations/Version20171125164500.php b/app/DoctrineMigrations/Version20171125164500.php index 2ee49d872..cdce4bad0 100644 --- a/app/DoctrineMigrations/Version20171125164500.php +++ b/app/DoctrineMigrations/Version20171125164500.php @@ -10,19 +10,19 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20171125164500 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $shaarliShareOriginUrl = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url'"); $this->skipIf(false !== $shaarliShareOriginUrl, 'It seems that you already played this migration.'); $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('shaarli_share_origin_url', '0', 'entry')"); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'shaarli_share_origin_url';"); } diff --git a/app/DoctrineMigrations/Version20180405182455.php b/app/DoctrineMigrations/Version20180405182455.php index 1b8c3b0e1..d9fc4263f 100755 --- a/app/DoctrineMigrations/Version20180405182455.php +++ b/app/DoctrineMigrations/Version20180405182455.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20180405182455 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -21,7 +21,7 @@ class Version20180405182455 extends WallabagMigration ]); } - public function postUp(Schema $schema) + public function postUp(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); $this->skipIf(!$entryTable->hasColumn('archived_at'), 'Unable to add archived_at colum'); @@ -34,7 +34,7 @@ class Version20180405182455 extends WallabagMigration ); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20181128203230.php b/app/DoctrineMigrations/Version20181128203230.php index add161cdc..bb3fc81c8 100644 --- a/app/DoctrineMigrations/Version20181128203230.php +++ b/app/DoctrineMigrations/Version20181128203230.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20181128203230 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.'); @@ -25,7 +25,7 @@ class Version20181128203230 extends WallabagMigration $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' CHANGE `value` `value` varchar(191)'); } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.'); diff --git a/app/DoctrineMigrations/Version20190129120000.php b/app/DoctrineMigrations/Version20190129120000.php index 8c5e28cab..38777b3a2 100644 --- a/app/DoctrineMigrations/Version20190129120000.php +++ b/app/DoctrineMigrations/Version20190129120000.php @@ -118,13 +118,13 @@ final class Version20190129120000 extends WallabagMigration ], ]; - public function up(Schema $schema) + public function up(Schema $schema): void { foreach ($this->settings as $setting) { $settingEnabled = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = '" . $setting['name'] . "'"); if (false !== $settingEnabled) { continue; @@ -134,7 +134,7 @@ final class Version20190129120000 extends WallabagMigration } } - public function down(Schema $schema) + public function down(Schema $schema): void { $this->skipIf(true, 'These settings are required and should not be removed.'); } diff --git a/app/DoctrineMigrations/Version20190401105353.php b/app/DoctrineMigrations/Version20190401105353.php index 600fc1621..cf0805142 100644 --- a/app/DoctrineMigrations/Version20190401105353.php +++ b/app/DoctrineMigrations/Version20190401105353.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20190401105353 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -24,7 +24,7 @@ class Version20190401105353 extends WallabagMigration $entryTable->addIndex(['user_id', 'hashed_url'], 'hashed_url_user_id', [], ['lengths' => [null, 40]]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20190601125843.php b/app/DoctrineMigrations/Version20190601125843.php index cbb92edc9..e2cdf9ac4 100644 --- a/app/DoctrineMigrations/Version20190601125843.php +++ b/app/DoctrineMigrations/Version20190601125843.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Doctrine\WallabagMigration; */ class Version20190601125843 extends WallabagMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); @@ -31,7 +31,7 @@ class Version20190601125843 extends WallabagMigration $entryTable->addIndex(['user_id', 'hashed_given_url'], 'hashed_given_url_user_id', [], ['lengths' => [null, 40]]); } - public function down(Schema $schema) + public function down(Schema $schema): void { $entryTable = $schema->getTable($this->getTable('entry')); diff --git a/app/DoctrineMigrations/Version20190826204730.php b/app/DoctrineMigrations/Version20190826204730.php index ee1ba6bf1..732aa88ce 100644 --- a/app/DoctrineMigrations/Version20190826204730.php +++ b/app/DoctrineMigrations/Version20190826204730.php @@ -48,7 +48,7 @@ final class Version20190826204730 extends WallabagMigration $previous_rule = $this->container ->get('doctrine.orm.default_entity_manager') ->getConnection() - ->fetchArray('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'"); + ->fetchOne('SELECT * FROM ' . $this->getTable('ignore_origin_instance_rule') . " WHERE rule = '" . $entity['rule'] . "'"); if (false === $previous_rule) { $this->addSql('INSERT INTO ' . $this->getTable('ignore_origin_instance_rule') . " (rule) VALUES ('" . $entity['rule'] . "');"); diff --git a/app/DoctrineMigrations/Version20221221092957.php b/app/DoctrineMigrations/Version20221221092957.php new file mode 100644 index 000000000..438407360 --- /dev/null +++ b/app/DoctrineMigrations/Version20221221092957.php @@ -0,0 +1,62 @@ +getTable('user'); + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'sqlite': + $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, password, last_login, password_requested_at, name, created_at, updated_at, authCode, emailTwoFactor, salt, confirmation_token, roles, googleAuthenticatorSecret, backupCodes FROM ' . $userTable); + $this->addSql('DROP TABLE ' . $userTable); + $this->addSql('CREATE TABLE ' . $userTable . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array) + , name CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json) + , emailTwoFactor BOOLEAN NOT NULL)'); + $this->addSql('INSERT INTO ' . $userTable . ' (id, username, username_canonical, email, email_canonical, enabled, password, last_login, password_requested_at, name, created_at, updated_at, authCode, emailTwoFactor, salt, confirmation_token, roles, googleAuthenticatorSecret, backupCodes) SELECT id, username, username_canonical, email, email_canonical, enabled, password, last_login, password_requested_at, name, created_at, updated_at, authCode, emailTwoFactor, salt, confirmation_token, roles, googleAuthenticatorSecret, backupCodes FROM __temp__wallabag_user'); + $this->addSql('DROP TABLE __temp__wallabag_user'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $userTable . ' (username_canonical)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $userTable . ' (email_canonical)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $userTable . ' (confirmation_token)'); + break; + case 'mysql': + $this->addSql('ALTER TABLE ' . $userTable . ' CHANGE backupCodes backupCodes JSON DEFAULT NULL'); + break; + case 'postgresql': + $this->addSql('ALTER TABLE ' . $userTable . ' ALTER backupcodes TYPE JSON USING backupcodes::json'); + break; + } + } + + public function down(Schema $schema): void + { + $userTable = $this->getTable('user'); + switch ($this->connection->getDatabasePlatform()->getName()) { + case 'sqlite': + $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, googleAuthenticatorSecret, backupCodes, emailTwoFactor FROM ' . $userTable); + $this->addSql('DROP TABLE ' . $userTable); + $this->addSql('CREATE TABLE ' . $userTable . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array) + , name CLOB DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, authCode INTEGER DEFAULT NULL, googleAuthenticatorSecret VARCHAR(255) DEFAULT NULL, backupCodes CLOB DEFAULT NULL --(DC2Type:json_array) + , emailTwoFactor BOOLEAN NOT NULL)'); + $this->addSql('INSERT INTO ' . $userTable . ' (id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, googleAuthenticatorSecret, backupCodes, emailTwoFactor) SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, googleAuthenticatorSecret, backupCodes, emailTwoFactor FROM __temp__wallabag_user'); + $this->addSql('DROP TABLE __temp__wallabag_user'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $userTable . ' (username_canonical)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $userTable . ' (email_canonical)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $userTable . ' (confirmation_token)'); + break; + case 'mysql': + $this->addSql('ALTER TABLE ' . $userTable . ' CHANGE backupCodes backupCodes JSON DEFAULT NULL COMMENT \'(DC2Type:json_array)\''); + break; + case 'postgresql': + $this->addSql('ALTER TABLE ' . $userTable . ' ALTER backupCodes TYPE TEXT'); + break; + } + } +} diff --git a/app/DoctrineMigrations/Version20230613121354.php b/app/DoctrineMigrations/Version20230613121354.php new file mode 100644 index 000000000..af881f8a9 --- /dev/null +++ b/app/DoctrineMigrations/Version20230613121354.php @@ -0,0 +1,30 @@ +getTable($this->getTable('config')); + + $this->skipIf($configTable->hasColumn('display_thumbnails'), 'It seems that you already played this migration.'); + + $configTable->addColumn('display_thumbnails', 'integer', [ + 'default' => 1, + 'notnull' => false, + ]); + } + + public function down(Schema $schema): void + { + $configTable = $schema->getTable($this->getTable('config')); + $configTable->dropColumn('display_thumbnails'); + } +} diff --git a/app/Resources/static/themes/material/css/article.scss b/app/Resources/static/themes/material/css/article.scss index edfd60071..d933c18be 100644 --- a/app/Resources/static/themes/material/css/article.scss +++ b/app/Resources/static/themes/material/css/article.scss @@ -54,7 +54,7 @@ } a { - border-bottom: 1px dotted $blueAccentColor; + border-bottom: 1px dotted $blue-accent-color; text-decoration: none; } @@ -105,14 +105,15 @@ margin: 2.1rem 0 0.68rem; } - aside { + .entry-info { .tools { display: flex; - flex-flow: row wrap; + margin: 8px 5px 5px; + flex-wrap: wrap; .stats { + margin: 0; font-size: 0.7em; - margin: 8px 5px 5px; li { display: inline-flex; @@ -133,18 +134,21 @@ } .tags { - float: right; - margin: 5px 15px 10px; + display: flex; + margin: 0; + align-items: center; + gap: 5px; } } .chip { - background-color: #9e9e9e; - padding: 0 15px 0 10px; - margin: auto 2px; - border-radius: 6px; - height: 18px; - line-height: 18px; + display: flex; + margin: 0; + padding: 0; + height: 25px; + line-height: 25px; + align-items: center; + background-color: transparent; a, i { @@ -152,15 +156,45 @@ } i.material-icons { - float: right; font-size: 16px; - line-height: 18px; - padding-left: 8px; + vertical-align: sub; } } + + .chip-label { + padding-left: 10px; + padding-right: 5px; + background-color: #9e9e9e; + border-radius: 6px 0 0 6px; + } + + .chip-action { + padding: 0 5px; + background-color: #868686; + border-radius: 0 6px 6px 0; + } + + .chip-label, + .chip-action { + min-width: 30px; + text-align: center; + } + + .chip-label:hover, + .chip-label:active, + .chip-label:focus, + .chip-action:hover, + .chip-action:active, + .chip-action:focus { + background-color: #5e5e5e; + } } } +.entry-info { + margin-bottom: 40px; +} + .reader-mode { width: 70px !important; transition: width 0.2s ease; @@ -200,3 +234,28 @@ margin: 0; z-index: 9999; } + +@media only screen and (max-width: 640px) { + .entry-info { + margin-bottom: 20px; + } + + #article .entry-info .tools { + margin-left: 0; + margin-right: 0; + } + + #article .entry-info .tools .tags { + gap: 10px; + } + + #article .entry-info .chip { + height: 32px; + line-height: 32px; + } + + #article .entry-info .chip-label, + #article .entry-info .chip-action { + min-width: 40px; + } +} diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index f46971781..ae045bf35 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss @@ -73,7 +73,7 @@ main { .card-entry-labels-hidden li { display: inline-block; - background-color: $blueAccentColor; + background-color: $blue-accent-color; margin: 0 5px; padding: 5px 12px; border-radius: 3px; @@ -85,10 +85,6 @@ main { white-space: nowrap; } - .card-content .estimatedTime { - margin-bottom: 10px; - } - .card-action { padding: 10px 10px 10px 15px; @@ -160,7 +156,7 @@ a.original:not(.waves-effect) { .card-tag-labels li { margin: 10px 10px 10px auto; padding: 5px 12px 5px 16px !important; - background-color: $blueAccentColor; + background-color: $blue-accent-color; border-radius: 3px; color: #fff; cursor: default; @@ -251,7 +247,7 @@ a.original:not(.waves-effect) { } .chip { - background-color: $blueAccentColor; + background-color: $blue-accent-color; padding: 0 7px; margin: auto 1px; border-radius: 6px; @@ -315,10 +311,19 @@ a.original:not(.waves-effect) { color: #fff !important; } -.settings .div_tabs { +.settings .tabs-container { padding-bottom: 15px; } +.settings .settings-checkbox-col { + padding: 0; +} + +.settings .settings-checkbox-label { + margin-bottom: 20px; + height: 3rem; +} + .entries-row { display: grid; margin: 0.4rem 0 0; diff --git a/app/Resources/static/themes/material/css/dark_theme.scss b/app/Resources/static/themes/material/css/dark_theme.scss index 4e83054e8..f3eaabc25 100644 --- a/app/Resources/static/themes/material/css/dark_theme.scss +++ b/app/Resources/static/themes/material/css/dark_theme.scss @@ -1,6 +1,8 @@ .dark-theme { - body, - main #content, + body { + background-color: #101010; + } + #article, .card, .card-panel, @@ -10,13 +12,11 @@ .collapsible-header, .collection, .dropdown-content, - .nav-panel-add, - .nav-panel-search, .side-nav, .side-nav .collapsible-body, .side-nav.fixed .collapsible-body, .tabs { - background-color: #121212; + background-color: #131716; } table.striped > tbody > tr:nth-child(2n+1), @@ -50,7 +50,7 @@ background-color: #272727; } - main #content, + #content, #article article, #article article h1, #article article h2, @@ -59,7 +59,8 @@ #article article h5, #article article h6, .dropdown-content li > a, - .results a, + .nav-panels .input-field input:focus, + .results-item, .side-nav li > a, .side-nav li > a > i.material-icons { color: #dfdfdf; @@ -67,18 +68,19 @@ .cyan, .cyan.darken-1, - .cyan.darken-2 { + .cyan.darken-2, + .nav-panel-add, + .nav-panel-search { background-color: #1d1d1d !important; } - .grey-text.text-darken-4 { + .grey-text.text-darken-4, + .nav-panel-item .add, + .nav-panel-item .search, + .nav-panels .close { color: #dfdfdf !important; } - #article .chip { - background-color: #373737; - } - .side-nav li.active { background-color: #2f2f2f; } @@ -120,11 +122,20 @@ } .hljs, - #article pre.hljs { + #article pre { color: #abb2bf; background-color: #282c34; } + nav input { + color: #abb2bf; + } + + .input-field.nav-panel-add.disabled, + .input-field.nav-panel-add.disabled input { + background-color: transparent; + } + @media only screen and (min-width: 992px) { #article { background-color: #101010; diff --git a/app/Resources/static/themes/material/css/entries.scss b/app/Resources/static/themes/material/css/entries.scss index 37764cf8c..cc22552d2 100644 --- a/app/Resources/static/themes/material/css/entries.scss +++ b/app/Resources/static/themes/material/css/entries.scss @@ -2,40 +2,73 @@ * Entries * ========================================================================== */ -.mass-buttons { - margin: 10px 5px 10px 20px; +.mass-action-toggle { + display: inline-flex; + background-color: transparent; + border: none; + cursor: pointer; - #selectAll { - position: relative; - opacity: initial; - left: 0; - } - - span { - padding: 3px; - } - - button { - i { - font-size: 15px; - } - - height: 24px; - line-height: 24px; - padding: 0 0.5rem; - margin-right: 0.75rem; + &:focus { + background-color: transparent; } } -.card-stacked { - input[type="checkbox"] { - position: relative; - opacity: initial; - left: 0; - } +.mass-action { + margin: 10px 5px 10px 20px; +} - .entry-checkbox { - margin-right: 10px; +.mass-action-group { + display: flex; + padding: 3px; + gap: 10px; +} + +.mass-action-button { + height: 24px; + line-height: 24px; + padding: 0 0.5rem; + + i { + font-size: 1rem; + } +} + +.entry-checkbox { + margin: 10px 15px 10px 5px; + + .card & { + float: right; + margin-right: 0; + padding: 10px; + } +} + +.entries .entry-checkbox-input, +.mass-action .entry-checkbox-input { + position: relative; + left: 0; + width: 20px; + min-height: 25px; + height: 100%; + vertical-align: middle; + opacity: initial; + z-index: 10; +} + +.toggle-checkbox:not(:checked) + .mass-action, +.toggle-checkbox:not(:checked) + .mass-action-tags, +.toggle-checkbox:not(:checked) ~ .entries .entry-checkbox, +.toggle-checkbox:checked ~ .entries .card-preview { + display: none; +} + +.mass-action-tags { + display: flex; + align-items: center; + gap: 10px; + + .mass-action-tags-input { + margin: 0; } } @@ -62,10 +95,10 @@ .nb-results { display: inline-flex; } +} - a { - color: #444; - } +.results-item { + color: #444; } .pagination { @@ -138,3 +171,11 @@ footer { margin-bottom: 10px; } } + +@media screen and (min-width: 993px) { + .mass-action { + display: flex; + align-items: center; + gap: 30px; + } +} diff --git a/app/Resources/static/themes/material/css/icons.scss b/app/Resources/static/themes/material/css/icons.scss index 5f60d20fd..54b9c81f5 100644 --- a/app/Resources/static/themes/material/css/icons.scss +++ b/app/Resources/static/themes/material/css/icons.scss @@ -21,12 +21,13 @@ word-wrap: normal; white-space: nowrap; direction: ltr; + user-select: none; /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; + text-rendering: optimizelegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss index a81001897..d27d20076 100755 --- a/app/Resources/static/themes/material/css/layout.scss +++ b/app/Resources/static/themes/material/css/layout.scss @@ -19,7 +19,7 @@ body { } a { - color: $blueAccentColor; + color: $blue-accent-color; } main, diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index c11fd5c42..0561835f1 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss @@ -10,7 +10,7 @@ @media only screen and (min-width: 992px) { nav, - body:not(.entry):not(.login) main, + .index main, footer { padding-left: 240px; } diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss index 3fb2504e3..1630489ac 100644 --- a/app/Resources/static/themes/material/css/nav.scss +++ b/app/Resources/static/themes/material/css/nav.scss @@ -131,11 +131,11 @@ nav { margin: 0 1%; } -#button_filters { +.button-filters { display: none; } -#button_export { +.button-export { display: none; } @@ -161,6 +161,16 @@ nav { } @media (min-width: 993px) { + .toggle-add-url-container { + flex-grow: 1; + } + + .toggle-add-url { + display: flex; + width: 100%; + justify-content: end; + } + .button-collapse { display: none; } diff --git a/app/Resources/static/themes/material/css/print.scss b/app/Resources/static/themes/material/css/print.scss index 0bf9300c9..2aae8a221 100755 --- a/app/Resources/static/themes/material/css/print.scss +++ b/app/Resources/static/themes/material/css/print.scss @@ -18,20 +18,16 @@ /* Hide useless blocks */ body > header, - #article_toolbar, - #links, - #sort, body > footer, - .top_link, - div.tools, + .entry-tools, header div, .messages, .entry + .results, - #slide-out, + .left-bar, .progress, .hide-on-large-only, - #article > aside, - #article .mbm a { + .entry-info, + .title-edit { display: none !important; } @@ -39,7 +35,7 @@ padding-left: 0 !important; } - #article { + .article { margin: inherit !important; } diff --git a/app/Resources/static/themes/material/css/sidenav.scss b/app/Resources/static/themes/material/css/sidenav.scss index f0932e4ab..00e4c5c2a 100644 --- a/app/Resources/static/themes/material/css/sidenav.scss +++ b/app/Resources/static/themes/material/css/sidenav.scss @@ -45,6 +45,6 @@ font-weight: bold; } -span.numberItems { +.items-number { float: right; } diff --git a/app/Resources/static/themes/material/css/variables.scss b/app/Resources/static/themes/material/css/variables.scss index fb0f0bb16..184991289 100644 --- a/app/Resources/static/themes/material/css/variables.scss +++ b/app/Resources/static/themes/material/css/variables.scss @@ -2,4 +2,4 @@ Variables ========================================================================== */ -$blueAccentColor: #00acc1; +$blue-accent-color: #00acc1; diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index c13a564ab..704a9ea11 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -19,7 +19,7 @@ import './css/index.scss'; const mobileMaxWidth = 993; -function darkTheme() { +(function darkTheme() { const rootEl = document.querySelector('html'); const themeDom = { darkClass: 'dark-theme', @@ -87,35 +87,42 @@ function darkTheme() { return true; }, }; + + const addDarkThemeListeners = () => { + $(document).ready(() => { + const lightThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="light"]'); + [...lightThemeButtons].map((lightThemeButton) => { + lightThemeButton.addEventListener('click', (e) => { + e.preventDefault(); + themeDom.removeClass(rootEl); + themeCookie.setCookie(false); + }); + return true; + }); + const darkThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="dark"]'); + [...darkThemeButtons].map((darkThemeButton) => { + darkThemeButton.addEventListener('click', (e) => { + e.preventDefault(); + themeDom.addClass(rootEl); + themeCookie.setCookie(true); + }); + return true; + }); + const autoThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="auto"]'); + [...autoThemeButtons].map((autoThemeButton) => { + autoThemeButton.addEventListener('click', (e) => { + e.preventDefault(); + themeCookie.removeCookie(); + preferedColorScheme.choose(); + }); + return true; + }); + }); + }; + preferedColorScheme.init(); - const lightThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="light"]'); - [...lightThemeButtons].map((lightThemeButton) => { - lightThemeButton.addEventListener('click', (e) => { - e.preventDefault(); - themeDom.removeClass(rootEl); - themeCookie.setCookie(false); - }); - return true; - }); - const darkThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="dark"]'); - [...darkThemeButtons].map((darkThemeButton) => { - darkThemeButton.addEventListener('click', (e) => { - e.preventDefault(); - themeDom.addClass(rootEl); - themeCookie.setCookie(true); - }); - return true; - }); - const autoThemeButtons = document.querySelectorAll('.js-theme-toggle[data-theme="auto"]'); - [...autoThemeButtons].map((autoThemeButton) => { - autoThemeButton.addEventListener('click', (e) => { - e.preventDefault(); - themeCookie.removeCookie(); - preferedColorScheme.choose(); - }); - return true; - }); -} + addDarkThemeListeners(); +}()); const stickyNav = () => { const nav = $('.js-entry-nav-top'); @@ -150,7 +157,6 @@ const articleScroll = () => { $(document).ready(() => { // sideNav $('.button-collapse').sideNav(); - darkTheme(); $('select').material_select(); $('.collapsible').collapsible({ accordion: false, diff --git a/app/Resources/static/themes/material/js/shortcuts/main.js b/app/Resources/static/themes/material/js/shortcuts/main.js index 042b423c0..771cfb783 100644 --- a/app/Resources/static/themes/material/js/shortcuts/main.js +++ b/app/Resources/static/themes/material/js/shortcuts/main.js @@ -80,6 +80,13 @@ $(document).ready(() => { }); Mousetrap.bind('enter', () => { - window.location.href = window.location.origin + $(card).find('span.card-title a').attr('href'); + if (typeof card !== 'object') { + return; + } + + const url = $(card).find('.card-title a').attr('href'); + if (typeof url === 'string' && url.length > 0) { + window.location.href = window.location.origin + url; + } }); }); diff --git a/app/config/config.yml b/app/config/config.yml index 011039853..62c1a500c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -14,6 +14,7 @@ framework: translator: enabled: true fallback: "%locale%" + default_path: '%kernel.project_dir%/translations' secret: "%secret%" router: resource: "%kernel.project_dir%/app/config/routing.yml" @@ -33,6 +34,8 @@ framework: fragments: ~ http_method_override: true assets: ~ + mailer: + dsn: "%mailer_dsn%" # Twig Configuration twig: @@ -56,6 +59,8 @@ doctrine: charset: "%database_charset%" path: "%database_path%" unix_socket: "%database_socket%" + types: + json_array: Wallabag\CoreBundle\Doctrine\JsonArrayType orm: auto_generate_proxy_classes: "%kernel.debug%" @@ -72,22 +77,14 @@ stof_doctrine_extensions: sluggable: true doctrine_migrations: - dir_name: "%kernel.project_dir%/app/DoctrineMigrations" - namespace: Application\Migrations - table_name: migration_versions - name: Application Migrations - -# Swiftmailer Configuration -swiftmailer: - transport: "%mailer_transport%" - username: "%mailer_user%" - password: "%mailer_password%" - host: "%mailer_host%" - port: "%mailer_port%" - encryption: "%mailer_encryption%" - auth_mode: "%mailer_auth_mode%" - spool: - type: memory + migrations_paths: + 'Application\Migrations': "%kernel.project_dir%/app/DoctrineMigrations" + storage: + table_storage: + table_name: 'migration_versions' + version_column_name: 'version' + version_column_length: 192 + executed_at_column_name: 'executed_at' fos_rest: param_fetcher_listener: true @@ -133,12 +130,13 @@ nelmio_api_doc: title: wallabag API documentation description: This is the API documentation of wallabag version: 2.x - securityDefinitions: - Bearer: - type: apiKey - description: 'Value: Bearer {jwt}' - name: Authorization - in: header + components: + securitySchemes: + Bearer: + type: apiKey + description: 'Value: Bearer {jwt}' + name: Authorization + in: header security: - Bearer: [] @@ -179,8 +177,10 @@ fos_user: confirmation: enabled: "%fosuser_confirmation%" from_email: - address: "%from_email%" - sender_name: wallabag + address: "%from_email%" + sender_name: wallabag + service: + mailer: Wallabag\UserBundle\Mailer\UserMailer fos_oauth_server: db_driver: orm @@ -201,15 +201,15 @@ scheb_two_factor: lifetime: 2592000 backup_codes: - enabled: "%twofactor_auth%" + enabled: true google: - enabled: "%twofactor_auth%" + enabled: true issuer: "%server_name%" template: "@WallabagUser/Authentication/form.html.twig" email: - enabled: "%twofactor_auth%" + enabled: true sender_email: "%twofactor_sender%" digits: 6 template: "@WallabagUser/Authentication/form.html.twig" diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index fa6e14e73..2e41c7606 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -8,6 +8,10 @@ framework: profiler: only_exceptions: false + mailer: + # see https://mailcatcher.me/ + dsn: smtp://127.0.0.1:1025 + web_profiler: toolbar: true intercept_redirects: false @@ -35,12 +39,6 @@ monolog: VERBOSITY_DEBUG: DEBUG channels: [doctrine] -swiftmailer: - # see https://mailcatcher.me/ - transport: smtp - host: 'localhost' - port: 1025 - # If you want to use cache for queries used in WallabagExtension # Uncomment the following lines #doctrine: diff --git a/app/config/config_test.yml b/app/config/config_test.yml index 216f84316..d738a49d6 100644 --- a/app/config/config_test.yml +++ b/app/config/config_test.yml @@ -11,16 +11,13 @@ framework: collect: false translator: enabled: false + mailer: + dsn: 'null://null' web_profiler: toolbar: false intercept_redirects: false -swiftmailer: - # to be able to read emails sent - spool: - type: file - doctrine: dbal: driver: "%test_database_driver%" diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index dcaf4dffb..1c9a0c26f 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -23,16 +23,10 @@ parameters: # with PostgreSQL and SQLite, you must set "utf8" database_charset: utf8mb4 - domain_name: https://your-wallabag-url-instance.com + domain_name: https://your-wallabag-instance.wallabag.org server_name: "Your wallabag instance" - mailer_transport: smtp - mailer_user: ~ - mailer_password: ~ - mailer_host: 127.0.0.1 - mailer_port: false - mailer_encryption: ~ - mailer_auth_mode: ~ + mailer_dsn: smtp://127.0.0.1 locale: en @@ -40,7 +34,6 @@ parameters: secret: CHANGE_ME_TO_SOMETHING_SECRET_AND_RANDOM # two factor stuff - twofactor_auth: true twofactor_sender: no-reply@wallabag.org # fosuser stuff diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml index 95c1b0263..a57028de1 100644 --- a/app/config/routing_dev.yml +++ b/app/config/routing_dev.yml @@ -7,7 +7,7 @@ _profiler: prefix: /_profiler _errors: - resource: "@TwigBundle/Resources/config/routing/errors.xml" + resource: '@TwigBundle/Resources/config/routing/errors.xml' prefix: /_error _main: diff --git a/app/config/security.yml b/app/config/security.yml index 2a09648f3..9ab516215 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -34,12 +34,10 @@ security: provider: fos_userbundle login_firewall: - logout_on_user_change: true pattern: ^/login$ anonymous: ~ secured_area: - logout_on_user_change: true pattern: ^/ form_login: provider: fos_userbundle diff --git a/app/config/services.yml b/app/config/services.yml index 1125e53b9..28eaed1e2 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -33,7 +33,7 @@ services: Wallabag\AnnotationBundle\: resource: '../../src/Wallabag/AnnotationBundle/*' - exclude: '../../src/Wallabag/AnnotationBundle/{Controller,Entity}' + exclude: '../../src/Wallabag/AnnotationBundle/{Controller,Entity,DataFixtures}' Wallabag\ApiBundle\: resource: '../../src/Wallabag/ApiBundle/*' @@ -41,7 +41,80 @@ services: Wallabag\CoreBundle\: resource: '../../src/Wallabag/CoreBundle/*' - exclude: ['../../src/Wallabag/CoreBundle/{Controller,Entity}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] + exclude: ['../../src/Wallabag/CoreBundle/{Controller,Entity,DataFixtures}', '../../src/Wallabag/CoreBundle/Event/*Event.php'] + + # controllers are imported separately to make sure services can be injected + # as action arguments even if you don't extend any base controller class + Wallabag\AnnotationBundle\Controller\: + resource: '../../src/Wallabag/AnnotationBundle/Controller/' + tags: ['controller.service_arguments'] + + Wallabag\ApiBundle\Controller\: + resource: '../../src/Wallabag/ApiBundle/Controller/' + tags: ['controller.service_arguments'] + + Wallabag\CoreBundle\Controller\: + resource: '../../src/Wallabag/CoreBundle/Controller/' + tags: ['controller.service_arguments'] + + Wallabag\ImportBundle\Controller\: + resource: '../../src/Wallabag/ImportBundle/Controller/' + tags: ['controller.service_arguments'] + + Wallabag\UserBundle\Controller\: + resource: '../../src/Wallabag/UserBundle/Controller/' + tags: ['controller.service_arguments'] + + # inject alias service into controllers + Wallabag\ImportBundle\Controller\ChromeController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_chrome_producer' + $redisProducer: '@wallabag_import.producer.redis.chrome' + + Wallabag\ImportBundle\Controller\DeliciousController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_delicious_producer' + $redisProducer: '@wallabag_import.producer.redis.delicious' + + Wallabag\ImportBundle\Controller\ElcuratorController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_elcurator_producer' + $redisProducer: '@wallabag_import.producer.redis.elcurator' + + Wallabag\ImportBundle\Controller\FirefoxController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_firefox_producer' + $redisProducer: '@wallabag_import.producer.redis.firefox' + + Wallabag\ImportBundle\Controller\InstapaperController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_instapaper_producer' + $redisProducer: '@wallabag_import.producer.redis.instapaper' + + Wallabag\ImportBundle\Controller\PinboardController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_pinboard_producer' + $redisProducer: '@wallabag_import.producer.redis.pinboard' + + Wallabag\ImportBundle\Controller\PocketController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_pocket_producer' + $redisProducer: '@wallabag_import.producer.redis.pocket' + + Wallabag\ImportBundle\Controller\ReadabilityController: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_readability_producer' + $redisProducer: '@wallabag_import.producer.redis.readability' + + Wallabag\ImportBundle\Controller\WallabagV1Controller: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v1_producer' + $redisProducer: '@wallabag_import.producer.redis.wallabag_v1' + + Wallabag\ImportBundle\Controller\WallabagV2Controller: + arguments: + $rabbitMqProducer: '@old_sound_rabbit_mq.import_wallabag_v2_producer' + $redisProducer: '@wallabag_import.producer.redis.wallabag_v2' Wallabag\ImportBundle\: resource: '../../src/Wallabag/ImportBundle/*' @@ -49,7 +122,7 @@ services: Wallabag\UserBundle\: resource: '../../src/Wallabag/UserBundle/*' - exclude: '../../src/Wallabag/UserBundle/{Controller,Entity}' + exclude: '../../src/Wallabag/UserBundle/{Controller,Entity,DataFixtures}' Doctrine\DBAL\Connection: alias: doctrine.dbal.default_connection @@ -96,9 +169,6 @@ services: FOS\UserBundle\Model\UserManagerInterface: alias: fos_user.user_manager - Twig_Extensions_Extension_Text: - class: Twig_Extensions_Extension_Text - MatomoTwigExtension\MatomoTwigExtension: public: false @@ -186,8 +256,6 @@ services: path: '%redis_path%' password: '%redis_password%' - Wallabag\CoreBundle\Controller\ExceptionController: ~ - Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber: tags: - { name: doctrine.event_subscriber } @@ -200,9 +268,30 @@ services: arguments: $baseFolder: "%kernel.project_dir%/web/assets/images" + Wallabag\CoreBundle\Command\ExportCommand: + arguments: + $projectDir: '%kernel.project_dir%' + + Wallabag\CoreBundle\Command\InstallCommand: + arguments: + $databaseDriver: '%database_driver%' + $databaseName: '%database_name%' + $defaultSettings: '%wallabag_core.default_internal_settings%' + $defaultIgnoreOriginInstanceRules: '%wallabag_core.default_ignore_origin_instance_rules%' + wallabag_core.entry.download_images.client: alias: 'httplug.client.wallabag_core.entry.download_images' + Wallabag\UserBundle\Mailer\UserMailer: + arguments: + $parameters: + template: + confirmation: '%fos_user.registration.confirmation.template%' + resetting: '%fos_user.resetting.email.template%' + from_email: + confirmation: '%fos_user.registration.confirmation.from_email%' + resetting: '%fos_user.resetting.email.from_email%' + Wallabag\UserBundle\EventListener\CreateConfigListener: arguments: $itemsOnPage: "%wallabag_core.items_on_page%" @@ -211,6 +300,7 @@ services: $readingSpeed: "%wallabag_core.reading_speed%" $actionMarkAsRead: "%wallabag_core.action_mark_as_read%" $listMode: "%wallabag_core.list_mode%" + $displayThumbnails: "%wallabag_core.display_thumbnails%" Wallabag\UserBundle\EventListener\AuthenticationFailureListener: tags: @@ -260,3 +350,13 @@ services: Wallabag\ImportBundle\Import\ChromeImport: tags: - { name: wallabag_import.import, alias: chrome } + + # to factorize the proximity and bypass translation for prev & next + pagerfanta.view.default_wallabag: + class: Pagerfanta\View\OptionableView + arguments: + - '@pagerfanta.view.twitter_bootstrap' + - { proximity: 1, prev_message: "<", next_message: ">" } + public: false + tags: + - { name: pagerfanta.view, alias: default_wallabag } diff --git a/app/config/services_rabbit.yml b/app/config/services_rabbit.yml index e407745d2..26e02a784 100644 --- a/app/config/services_rabbit.yml +++ b/app/config/services_rabbit.yml @@ -5,6 +5,20 @@ services: autoconfigure: true public: true + Wallabag\ImportBundle\Consumer\RabbitMQConsumerTotalProxy: + lazy: true + arguments: + $pocketConsumer: '@old_sound_rabbit_mq.import_pocket_consumer' + $readabilityConsumer: '@old_sound_rabbit_mq.import_readability_consumer' + $wallabagV1Consumer: '@old_sound_rabbit_mq.import_wallabag_v1_consumer' + $wallabagV2Consumer: '@old_sound_rabbit_mq.import_wallabag_v2_consumer' + $firefoxConsumer: '@old_sound_rabbit_mq.import_firefox_consumer' + $chromeConsumer: '@old_sound_rabbit_mq.import_chrome_consumer' + $instapaperConsumer: '@old_sound_rabbit_mq.import_instapaper_consumer' + $pinboardConsumer: '@old_sound_rabbit_mq.import_pinboard_consumer' + $deliciousConsumer: '@old_sound_rabbit_mq.import_delicious_consumer' + $elcuratorConsumer: '@old_sound_rabbit_mq.import_elcurator_consumer' + wallabag_import.consumer.amqp.pocket: class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer arguments: diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index 5a16a7110..d96a2cca2 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml @@ -1,6 +1,6 @@ wallabag_core: - version: 2.5.2 - paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" + version: 2.6.2 + paypal_url: "https://liberapay.com/wallabag/donate" languages: en: 'English' fr: 'Français' @@ -30,6 +30,7 @@ wallabag_core: cache_lifetime: 10 action_mark_as_read: 1 list_mode: 0 + display_thumbnails: 1 fetching_error_message_title: 'No title found' fetching_error_message: | wallabag can't retrieve contents for this article. Please troubleshoot this issue. diff --git a/composer.json b/composer.json index 38b89140a..d6711f313 100644 --- a/composer.json +++ b/composer.json @@ -1,33 +1,38 @@ { "name": "wallabag/wallabag", - "type": "project", "description": "open source self hostable read-it-later web application", + "license": "MIT", + "type": "project", "keywords": [ "poche", "wallabag", "read-it-later", "read it later" ], - "homepage": "https://github.com/wallabag/wallabag", - "license": "MIT", "authors": [ { "name": "Nicolas Lœuillet", "email": "nicolas@loeuillet.org", - "homepage": "http://www.cdetc.fr", + "homepage": "https://nicolas.loeuillet.org", "role": "Developer" }, { "name": "Thomas Citharel", - "homepage": "http://tcit.fr", + "homepage": "https://tcit.fr", "role": "Developer" }, { "name": "Jérémy Benoist", "homepage": "https://www.j0k3r.net", "role": "Developer" + }, + { + "name": "Kevin Decherf", + "homepage": "https://kdecherf.com/", + "role": "Developer" } ], + "homepage": "https://github.com/wallabag/wallabag", "support": { "email": "hello@wallabag.org", "issues": "https://github.com/wallabag/wallabag/issues" @@ -51,46 +56,47 @@ "ext-tidy": "*", "ext-tokenizer": "*", "ext-xml": "*", - "babdev/pagerfanta-bundle": "^2.5", + "babdev/pagerfanta-bundle": "^3.7", "bdunogier/guzzle-site-authenticator": "^1.0.0", "craue/config-bundle": "^2.3.0", "defuse/php-encryption": "^2.1", "doctrine/collections": "^1.6", - "doctrine/common": "^2.13", - "doctrine/dbal": "^2.13", - "doctrine/doctrine-bundle": "^1.9", - "doctrine/doctrine-cache-bundle": "^1.3", - "doctrine/doctrine-migrations-bundle": "^1.3", + "doctrine/common": "^3.0", + "doctrine/dbal": "^3.3", + "doctrine/doctrine-bundle": "^2.0", + "doctrine/doctrine-migrations-bundle": "^3.2", "doctrine/event-manager": "^1.1", - "doctrine/migrations": "^1.8", + "doctrine/migrations": "^3.2", "doctrine/orm": "^2.6", - "doctrine/persistence": "^1.3", + "doctrine/persistence": "^3.0", + "egulias/email-validator": "^3.2", "enshrined/svg-sanitize": "^0.15.4", "friendsofsymfony/jsrouting-bundle": "^2.2", - "friendsofsymfony/oauth-server-bundle": "^1.5", - "friendsofsymfony/rest-bundle": "~2.1", - "friendsofsymfony/user-bundle": "2.1.*", + "friendsofsymfony/oauth-server-bundle": "dev-master#dc8ff343363cf794d30eb1a123610d186a43f162", + "friendsofsymfony/rest-bundle": "~3.4", + "friendsofsymfony/user-bundle": "^3.1", "guzzlehttp/guzzle": "^5.3.1", - "guzzlehttp/psr7": "^1.8", + "guzzlehttp/psr7": "^2.5", "html2text/html2text": "^4.1", "incenteev/composer-parameter-handler": "^2.1", "j0k3r/graby": "^2.0", "javibravo/simpleue": "^2.0", "jms/serializer": "^3.17", - "jms/serializer-bundle": "~3.6", + "jms/serializer-bundle": "~5.0", "kphoen/rulerz": "^0.21", "kphoen/rulerz-bundle": "~0.13", - "laminas/laminas-code": "^3.4", - "laminas/laminas-diactoros": "^2.3", - "lexik/form-filter-bundle": "^5.0.4", + "laminas/laminas-code": "^4.7", + "lcobucci/jwt": "~4.1.5", + "lexik/form-filter-bundle": "^7.0", "mgargano/simplehtmldom": "~1.5", "mnapoli/piwik-twig-extension": "^3.0", - "nelmio/api-doc-bundle": "^3.0", - "nelmio/cors-bundle": "~1.5", + "nelmio/api-doc-bundle": "^4.10", + "nelmio/cors-bundle": "~2.2", "ocramius/proxy-manager": "^2.1.1", - "pagerfanta/pagerfanta": "^2.4", - "php-amqplib/php-amqplib": "^2.12", - "php-amqplib/rabbitmq-bundle": "^1.14", + "pagerfanta/doctrine-orm-adapter": "^3.7", + "pagerfanta/twig": "^3.7", + "php-amqplib/php-amqplib": "^3.4", + "php-amqplib/rabbitmq-bundle": "^2.11", "php-http/client-common": "^2.4", "php-http/discovery": "^1.14", "php-http/guzzle5-adapter": "^2.0", @@ -102,27 +108,34 @@ "predis/predis": "^2.0.3", "psr/http-message": "^1.0", "psr/log": "^1.1", - "scheb/two-factor-bundle": "^4.11.0", - "sensio/framework-extra-bundle": "^5.2", - "sentry/sentry-symfony": "3.5.3", + "scheb/2fa-backup-code": "^5.13", + "scheb/2fa-bundle": "^5.13", + "scheb/2fa-email": "^5.13", + "scheb/2fa-google-authenticator": "^5.13", + "scheb/2fa-qr-code": "^5.13", + "scheb/2fa-trusted-device": "^5.13", + "sensio/framework-extra-bundle": "^6.2", + "sentry/sentry-symfony": "4.10.0", "stof/doctrine-extensions-bundle": "^1.2", - "swiftmailer/swiftmailer": "^6.3", "symfony/dom-crawler": "^4.0", + "symfony/mailer": "^4.0", "symfony/monolog-bundle": "^3.1", - "symfony/swiftmailer-bundle": "^3.2", + "symfony/proxy-manager-bridge": "^4.4", "symfony/symfony": "^4.0", "tecnickcom/tcpdf": "^6.3.0", - "twig/extensions": "^1.5", - "twig/twig": "^2.15", + "twig/extra-bundle": "^3.4", + "twig/string-extra": "^3.4", + "twig/twig": "^3.4.3", "wallabag/php-mobi": "~1.0", "wallabag/phpepub": "^4.0.10", "willdurand/hateoas": "^3.8", "willdurand/hateoas-bundle": "~2.1" }, "require-dev": { - "dama/doctrine-test-bundle": "^6.0", + "dama/doctrine-test-bundle": "^7.1", "doctrine/doctrine-fixtures-bundle": "~3.0", - "friendsofphp/php-cs-fixer": "~2.13", + "ergebnis/composer-normalize": "^2.28", + "friendsofphp/php-cs-fixer": "~3.4", "friendsoftwig/twigcs": "^6.0", "m6web/redis-mock": "^5.0", "php-http/mock-client": "^1.0", @@ -137,24 +150,8 @@ "suggest": { "ext-imagick": "To keep GIF animation when downloading image is enabled" }, - "scripts": { - "post-cmd": [ - "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", - "bin/console cache:clear --no-warmup", - "bin/console assets:install web --symlink --relative" - ], - "post-install-cmd": [ - "@post-cmd" - ], - "post-update-cmd": [ - "@post-cmd" - ] - }, - "extra": { - "incenteev-parameters": { - "file": "app/config/parameters.yml" - } - }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Wallabag\\": "src/Wallabag/" @@ -173,15 +170,34 @@ ] }, "config": { + "allow-plugins": { + "phpstan/extension-installer": true, + "php-http/discovery": true, + "ergebnis/composer-normalize": true + }, "bin-dir": "bin", "platform": { "php": "7.4.29" }, - "sort-packages": true, - "allow-plugins": { - "phpstan/extension-installer": true - } + "sort-packages": true }, - "minimum-stability": "dev", - "prefer-stable": true + "extra": { + "incenteev-parameters": { + "file": "app/config/parameters.yml" + }, + "public-dir": "web" + }, + "scripts": { + "post-install-cmd": [ + "@post-cmd" + ], + "post-update-cmd": [ + "@post-cmd" + ], + "post-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "bin/console cache:clear --no-warmup", + "bin/console assets:install web --symlink --relative" + ] + } } diff --git a/composer.lock b/composer.lock index 418fb0f3a..966771c11 100644 --- a/composer.lock +++ b/composer.lock @@ -4,68 +4,68 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7b841fce4fa9254c6b7aeaf23ce1c63a", + "content-hash": "380ee6b102e29c7cbb589a66f15fc145", "packages": [ { "name": "babdev/pagerfanta-bundle", - "version": "v2.11.0", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/BabDev/PagerfantaBundle.git", - "reference": "98bd0756de82080ace1a2e41e66f618e469da943" + "reference": "39df12df63177fee40c17c6efff8d4110bea3c94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/BabDev/PagerfantaBundle/zipball/98bd0756de82080ace1a2e41e66f618e469da943", - "reference": "98bd0756de82080ace1a2e41e66f618e469da943", + "url": "https://api.github.com/repos/BabDev/PagerfantaBundle/zipball/39df12df63177fee40c17c6efff8d4110bea3c94", + "reference": "39df12df63177fee40c17c6efff8d4110bea3c94", "shasum": "" }, "require": { - "pagerfanta/pagerfanta": "^2.7", - "php": "^7.2 || ^8.0", - "symfony/config": "^3.4 || ^4.4 || ^5.3", - "symfony/dependency-injection": "^3.4 || ^4.4 || ^5.3", - "symfony/deprecation-contracts": "^2.1", - "symfony/http-foundation": "^3.4 || ^4.4 || ^5.3", - "symfony/http-kernel": "^3.4 || ^4.4 || ^5.3", - "symfony/property-access": "^3.4 || ^4.4 || ^5.3", - "symfony/routing": "^3.4 || ^4.4 || ^5.3" + "pagerfanta/core": "^3.1", + "php": "^7.4 || ^8.0", + "symfony/config": "^4.4 || ^5.4 || ^6.0", + "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/http-foundation": "^4.4 || ^5.4 || ^6.0", + "symfony/http-kernel": "^4.4 || ^5.4 || ^6.0", + "symfony/polyfill-php80": "^1.15", + "symfony/property-access": "^4.4 || ^5.4 || ^6.0", + "symfony/routing": "^4.4 || ^5.4 || ^6.0" }, "conflict": { + "pagerfanta/twig": "<3.1", "twig/twig": "<1.35 || >=2.0,<2.5", "white-october/pagerfanta-bundle": "*" }, "require-dev": { "doctrine/annotations": "^1.8", "jms/serializer": "^3.0", - "jms/serializer-bundle": "^3.0", - "matthiasnoback/symfony-dependency-injection-test": "^4.1", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^0.12.94", - "phpstan/phpstan-phpunit": "^0.12.21", - "phpstan/phpstan-symfony": "^0.12.41", - "phpunit/phpunit": "^8.5 || ^9.3", - "symfony/phpunit-bridge": "^4.4 || ^5.3", - "symfony/serializer": "^3.4 || ^4.4 || ^5.3", - "symfony/translation": "^3.4 || ^4.4 || ^5.3", - "symfony/twig-bridge": "^3.4 || ^4.4 || ^5.3", - "symfony/twig-bundle": "^3.4 || ^4.4 || ^5.3", + "jms/serializer-bundle": "^3.0 || ^4.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.3", + "pagerfanta/twig": "^3.1", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "1.10.15", + "phpstan/phpstan-phpunit": "1.3.13", + "phpstan/phpstan-symfony": "1.2.19", + "phpunit/phpunit": "9.6.8", + "symfony/phpunit-bridge": "^5.4 || ^6.0", + "symfony/serializer": "^4.4 || ^5.4 || ^6.0", + "symfony/translation": "^4.4 || ^5.4 || ^6.0", + "symfony/twig-bridge": "^4.4 || ^5.4 || ^6.0", + "symfony/twig-bundle": "^4.4 || ^5.4 || ^6.0", "twig/twig": "^1.35 || ^2.5 || ^3.0" }, "suggest": { "jms/serializer-bundle": "To use the Pagerfanta class with the JMS Serializer", "symfony/serializer": "To use the Pagerfanta class with the Symfony Serializer", - "symfony/translation": "To use the Pagerfanta views with translation support", + "symfony/translation": "To use the Twig templates with translation support", "twig/twig": "To integrate Pagerfanta with Twig through extensions" }, "type": "symfony-bundle", "autoload": { "psr-4": { - "BabDev\\PagerfantaBundle\\": "" - }, - "exclude-from-classmap": [ - "Tests/" - ] + "BabDev\\PagerfantaBundle\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -79,7 +79,7 @@ ], "support": { "issues": "https://github.com/BabDev/PagerfantaBundle/issues", - "source": "https://github.com/BabDev/PagerfantaBundle/tree/v2.11.0" + "source": "https://github.com/BabDev/PagerfantaBundle/tree/v3.8.0" }, "funding": [ { @@ -87,7 +87,61 @@ "type": "github" } ], - "time": "2021-08-01T16:42:35+00:00" + "time": "2023-06-01T01:04:54+00:00" + }, + { + "name": "bacon/bacon-qr-code", + "version": "2.0.8", + "source": { + "type": "git", + "url": "https://github.com/Bacon/BaconQrCode.git", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22", + "shasum": "" + }, + "require": { + "dasprid/enum": "^1.0.3", + "ext-iconv": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phly/keep-a-changelog": "^2.1", + "phpunit/phpunit": "^7 | ^8 | ^9", + "spatie/phpunit-snapshot-assertions": "^4.2.9", + "squizlabs/php_codesniffer": "^3.4" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "type": "library", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "support": { + "issues": "https://github.com/Bacon/BaconQrCode/issues", + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8" + }, + "time": "2022-12-07T17:46:57+00:00" }, { "name": "bdunogier/guzzle-site-authenticator", @@ -324,79 +378,6 @@ ], "time": "2022-02-21T13:15:14+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, { "name": "craue/config-bundle", "version": "2.6.0", @@ -479,17 +460,67 @@ "time": "2022-01-24T15:04:40+00:00" }, { - "name": "defuse/php-encryption", - "version": "v2.3.1", + "name": "dasprid/enum", + "version": "1.0.4", "source": { "type": "git", - "url": "https://github.com/defuse/php-encryption.git", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8e6b6ea76eabbf19ea2bf5b67b98e1860474012f", + "reference": "8e6b6ea76eabbf19ea2bf5b67b98e1860474012f", + "shasum": "" + }, + "require": { + "php": ">=7.1 <9.0" + }, + "require-dev": { + "phpunit/phpunit": "^7 | ^8 | ^9", + "squizlabs/php_codesniffer": "*" + }, + "type": "library", + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" + } + ], + "description": "PHP 7.1 enum implementation", + "keywords": [ + "enum", + "map" + ], + "support": { + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.4" + }, + "time": "2023-03-01T18:44:03+00:00" + }, + { + "name": "defuse/php-encryption", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/f53396c2d34225064647a05ca76c1da9d99e5828", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828", "shasum": "" }, "require": { @@ -498,7 +529,8 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" + "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", + "yoast/phpunit-polyfills": "^2.0.0" }, "bin": [ "bin/generate-defuse-key" @@ -540,38 +572,41 @@ ], "support": { "issues": "https://github.com/defuse/php-encryption/issues", - "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" + "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" }, - "time": "2021-04-09T23:57:26+00:00" + "time": "2023-06-19T06:10:36+00:00" }, { "name": "doctrine/annotations", - "version": "1.13.3", + "version": "1.14.3", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0" + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", - "reference": "648b0343343565c4a056bfc8392201385e8d89f0", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", + "doctrine/lexer": "^1 || ^2", "ext-tokenizer": "*", "php": "^7.1 || ^8.0", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2", + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "~1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6", "vimeo/psalm": "^4.10" }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, "type": "library", "autoload": { "psr-4": { @@ -613,22 +648,22 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.3" + "source": "https://github.com/doctrine/annotations/tree/1.14.3" }, - "time": "2022-07-02T10:48:51+00:00" + "time": "2023-02-01T09:20:38+00:00" }, { "name": "doctrine/cache", - "version": "1.13.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "56cd022adb5514472cb144c087393c1821911d09" + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/56cd022adb5514472cb144c087393c1821911d09", - "reference": "56cd022adb5514472cb144c087393c1821911d09", + "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", "shasum": "" }, "require": { @@ -638,19 +673,13 @@ "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", "cache/integration-tests": "dev-master", "doctrine/coding-standard": "^9", - "mongodb/mongodb": "^1.1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "predis/predis": "~1.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", "symfony/cache": "^4.4 || ^5.4 || ^6", "symfony/var-exporter": "^4.4 || ^5.4 || ^6" }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, "type": "library", "autoload": { "psr-4": { @@ -698,7 +727,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.13.0" + "source": "https://github.com/doctrine/cache/tree/2.2.0" }, "funding": [ { @@ -714,7 +743,7 @@ "type": "tidelift" } ], - "time": "2022-05-20T20:06:54+00:00" + "time": "2022-05-20T20:07:39+00:00" }, { "name": "doctrine/collections", @@ -788,46 +817,36 @@ }, { "name": "doctrine/common", - "version": "2.13.3", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "f3812c026e557892c34ef37f6ab808a6b567da7f" + "reference": "8b5e5650391f851ed58910b3e3d48a71062eeced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/f3812c026e557892c34ef37f6ab808a6b567da7f", - "reference": "f3812c026e557892c34ef37f6ab808a6b567da7f", + "url": "https://api.github.com/repos/doctrine/common/zipball/8b5e5650391f851ed58910b3e3d48a71062eeced", + "reference": "8b5e5650391f851ed58910b3e3d48a71062eeced", "shasum": "" }, "require": { - "doctrine/annotations": "^1.0", - "doctrine/cache": "^1.0", - "doctrine/collections": "^1.0", - "doctrine/event-manager": "^1.0", - "doctrine/inflector": "^1.0", - "doctrine/lexer": "^1.0", - "doctrine/persistence": "^1.3.3", - "doctrine/reflection": "^1.0", + "doctrine/persistence": "^2.0 || ^3.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^1.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpunit/phpunit": "^7.0", + "doctrine/coding-standard": "^9.0 || ^10.0", + "doctrine/collections": "^1", + "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^4.0.5" + "symfony/phpunit-bridge": "^6.1", + "vimeo/psalm": "^4.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.11.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" + "Doctrine\\Common\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -860,7 +879,7 @@ "email": "ocramius@gmail.com" } ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and much more.", + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", "homepage": "https://www.doctrine-project.org/projects/common.html", "keywords": [ "common", @@ -869,7 +888,7 @@ ], "support": { "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/2.13.x" + "source": "https://github.com/doctrine/common/tree/3.4.3" }, "funding": [ { @@ -885,39 +904,43 @@ "type": "tidelift" } ], - "time": "2020-06-05T16:46:05+00:00" + "time": "2022-10-09T11:47:59+00:00" }, { "name": "doctrine/dbal", - "version": "2.13.9", + "version": "3.6.5", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c480849ca3ad6706a39c970cdfe6888fa8a058b8" + "reference": "96d5a70fd91efdcec81fc46316efc5bf3da17ddf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c480849ca3ad6706a39c970cdfe6888fa8a058b8", - "reference": "c480849ca3ad6706a39c970cdfe6888fa8a058b8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/96d5a70fd91efdcec81fc46316efc5bf3da17ddf", + "reference": "96d5a70fd91efdcec81fc46316efc5bf3da17ddf", "shasum": "" }, "require": { - "doctrine/cache": "^1.0|^2.0", + "composer-runtime-api": "^2", + "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1.0", - "ext-pdo": "*", - "php": "^7.1 || ^8" + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "9.0.0", - "jetbrains/phpstorm-stubs": "2021.1", - "phpstan/phpstan": "1.4.6", - "phpunit/phpunit": "^7.5.20|^8.5|9.5.16", - "psalm/plugin-phpunit": "0.16.1", - "squizlabs/php_codesniffer": "3.6.2", - "symfony/cache": "^4.4", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", - "vimeo/psalm": "4.22.0" + "doctrine/coding-standard": "12.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2023.1", + "phpstan/phpstan": "1.10.21", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "9.6.9", + "psalm/plugin-phpunit": "0.18.4", + "squizlabs/php_codesniffer": "3.7.2", + "symfony/cache": "^5.4|^6.0", + "symfony/console": "^4.4|^5.4|^6.0", + "vimeo/psalm": "4.30.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -928,7 +951,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + "Doctrine\\DBAL\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -971,14 +994,13 @@ "queryobject", "sasql", "sql", - "sqlanywhere", "sqlite", "sqlserver", "sqlsrv" ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/2.13.9" + "source": "https://github.com/doctrine/dbal/tree/3.6.5" }, "funding": [ { @@ -994,29 +1016,33 @@ "type": "tidelift" } ], - "time": "2022-05-02T20:28:55+00:00" + "time": "2023-07-17T09:15:50+00:00" }, { "name": "doctrine/deprecations", - "version": "v1.0.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -1035,67 +1061,69 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "doctrine/doctrine-bundle", - "version": "1.12.13", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "85460b85edd8f61a16ad311e7ffc5d255d3c937c" + "reference": "22d53b2c5ad03929628fb4a928b01135585b7179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/85460b85edd8f61a16ad311e7ffc5d255d3c937c", - "reference": "85460b85edd8f61a16ad311e7ffc5d255d3c937c", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/22d53b2c5ad03929628fb4a928b01135585b7179", + "reference": "22d53b2c5ad03929628fb4a928b01135585b7179", "shasum": "" }, "require": { - "doctrine/dbal": "^2.5.12|^3.0", - "doctrine/doctrine-cache-bundle": "~1.2", - "doctrine/persistence": "^1.3.3", - "jdorn/sql-formatter": "^1.2.16", + "doctrine/annotations": "^1", + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/dbal": "^2.13.1 || ^3.3.2", + "doctrine/persistence": "^2.2 || ^3", + "doctrine/sql-formatter": "^1.0.1", "php": "^7.1 || ^8.0", - "symfony/cache": "^3.4.30|^4.3.3", - "symfony/config": "^3.4.30|^4.3.3", - "symfony/console": "^3.4.30|^4.3.3", - "symfony/dependency-injection": "^3.4.30|^4.3.3", - "symfony/doctrine-bridge": "^3.4.30|^4.3.3", - "symfony/framework-bundle": "^3.4.30|^4.3.3", - "symfony/service-contracts": "^1.1.1|^2.0" + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "symfony/config": "^4.4.3 || ^5.4 || ^6.0", + "symfony/console": "^4.4 || ^5.4 || ^6.0", + "symfony/dependency-injection": "^4.4.18 || ^5.4 || ^6.0", + "symfony/deprecation-contracts": "^2.1 || ^3", + "symfony/doctrine-bridge": "^4.4.22 || ^5.4 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0", + "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" }, "conflict": { - "doctrine/orm": "<2.6", - "twig/twig": "<1.34|>=2.0,<2.4" + "doctrine/orm": "<2.11 || >=3.0", + "twig/twig": "<1.34 || >=2.0,<2.4" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "doctrine/orm": "^2.6", - "ocramius/proxy-manager": "^2.1", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^7.5", - "symfony/phpunit-bridge": "^4.2", - "symfony/property-info": "^3.4.30|^4.3.3", - "symfony/proxy-manager-bridge": "^3.4|^4|^5", - "symfony/twig-bridge": "^3.4|^4.1", - "symfony/validator": "^3.4.30|^4.3.3", - "symfony/web-profiler-bundle": "^3.4.30|^4.3.3", - "symfony/yaml": "^3.4.30|^4.3.3", - "twig/twig": "^1.34|^2.12" + "doctrine/coding-standard": "^9.0", + "doctrine/orm": "^2.11 || ^3.0", + "friendsofphp/proxy-manager-lts": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.3 || ^10.0", + "psalm/plugin-phpunit": "^0.16.1", + "psalm/plugin-symfony": "^3", + "psr/log": "^1.1.4 || ^2.0 || ^3.0", + "symfony/phpunit-bridge": "^6.1", + "symfony/property-info": "^4.4 || ^5.4 || ^6.0", + "symfony/proxy-manager-bridge": "^4.4 || ^5.4 || ^6.0", + "symfony/security-bundle": "^4.4 || ^5.4 || ^6.0", + "symfony/twig-bridge": "^4.4 || ^5.4 || ^6.0", + "symfony/validator": "^4.4 || ^5.4 || ^6.0", + "symfony/web-profiler-bundle": "^4.4 || ^5.4 || ^6.0", + "symfony/yaml": "^4.4 || ^5.4 || ^6.0", + "twig/twig": "^1.34 || ^2.12 || ^3.0", + "vimeo/psalm": "^4.7" }, "suggest": { "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "ext-pdo": "*", "symfony/web-profiler-bundle": "To use the data collector." }, "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Bundle\\DoctrineBundle\\": "" @@ -1116,15 +1144,15 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" }, { "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org/" + "homepage": "https://www.doctrine-project.org/" } ], "description": "Symfony DoctrineBundle", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org", "keywords": [ "database", "dbal", @@ -1133,7 +1161,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/1.12.13" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.7.2" }, "funding": [ { @@ -1149,56 +1177,43 @@ "type": "tidelift" } ], - "time": "2020-11-14T13:38:44+00:00" + "time": "2022-12-07T12:07:11+00:00" }, { - "name": "doctrine/doctrine-cache-bundle", - "version": "1.4.0", + "name": "doctrine/doctrine-migrations-bundle", + "version": "3.2.4", "source": { "type": "git", - "url": "https://github.com/doctrine/DoctrineCacheBundle.git", - "reference": "6bee2f9b339847e8a984427353670bad4e7bdccb" + "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", + "reference": "94e6b0fe1a50901d52f59dbb9b4b0737718b2c1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/6bee2f9b339847e8a984427353670bad4e7bdccb", - "reference": "6bee2f9b339847e8a984427353670bad4e7bdccb", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/94e6b0fe1a50901d52f59dbb9b4b0737718b2c1e", + "reference": "94e6b0fe1a50901d52f59dbb9b4b0737718b2c1e", "shasum": "" }, "require": { - "doctrine/cache": "^1.4.2", - "doctrine/inflector": "^1.0", - "php": "^7.1", - "symfony/doctrine-bridge": "^3.4|^4.0" + "doctrine/doctrine-bundle": "~1.0|~2.0", + "doctrine/migrations": "^3.2", + "php": "^7.2|^8.0", + "symfony/framework-bundle": "~3.4|~4.0|~5.0|~6.0" }, "require-dev": { - "instaclick/coding-standard": "~1.1", - "instaclick/object-calisthenics-sniffs": "dev-master", - "instaclick/symfony2-coding-standard": "dev-remaster", - "phpunit/phpunit": "^7.0", - "predis/predis": "~0.8", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "~1.5", - "symfony/console": "^3.4|^4.0", - "symfony/finder": "^3.4|^4.0", - "symfony/framework-bundle": "^3.4|^4.0", - "symfony/phpunit-bridge": "^3.4|^4.0", - "symfony/security-acl": "^2.8", - "symfony/validator": "^3.4|^4.0", - "symfony/yaml": "^3.4|^4.0" - }, - "suggest": { - "symfony/security-acl": "For using this bundle to cache ACLs" + "doctrine/coding-standard": "^9", + "doctrine/orm": "^2.6", + "doctrine/persistence": "^1.3||^2.0", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5|^9.5", + "vimeo/psalm": "^4.22" }, "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" + "Doctrine\\Bundle\\MigrationsBundle\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1214,93 +1229,16 @@ "email": "fabien@symfony.com" }, { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Fabio B. Silva", - "email": "fabio.bat.silva@gmail.com" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@hotmail.com" + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org" }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org/" - } - ], - "description": "Symfony Bundle for Doctrine Cache", - "homepage": "https://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "support": { - "issues": "https://github.com/doctrine/DoctrineCacheBundle/issues", - "source": "https://github.com/doctrine/DoctrineCacheBundle/tree/1.4.0" - }, - "abandoned": true, - "time": "2019-11-29T11:22:01+00:00" - }, - { - "name": "doctrine/doctrine-migrations-bundle", - "version": "v1.3.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", - "reference": "49fa399181db4bf4f9f725126bd1cb65c4398dce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/49fa399181db4bf4f9f725126bd1cb65c4398dce", - "reference": "49fa399181db4bf4f9f725126bd1cb65c4398dce", - "shasum": "" - }, - "require": { - "doctrine/doctrine-bundle": "~1.0", - "doctrine/migrations": "^1.1", - "php": ">=5.4.0", - "symfony/framework-bundle": "~2.7|~3.3|~4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^7.4" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\MigrationsBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony DoctrineMigrationsBundle", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org", "keywords": [ "dbal", "migrations", @@ -1308,9 +1246,23 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues", - "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/1.3" + "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.2.4" }, - "time": "2018-12-03T11:55:33+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-migrations-bundle", + "type": "tidelift" + } + ], + "time": "2023-06-02T08:19:26+00:00" }, { "name": "doctrine/event-manager", @@ -1406,38 +1358,33 @@ }, { "name": "doctrine/inflector", - "version": "1.4.4", + "version": "2.0.8", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9" + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", - "reference": "4bd5c1cdfcd00e9e2d8c484f79150f67e5d355d9", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector", - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -1482,7 +1429,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/1.4.4" + "source": "https://github.com/doctrine/inflector/tree/2.0.8" }, "funding": [ { @@ -1498,34 +1445,34 @@ "type": "tidelift" } ], - "time": "2021-04-16T17:34:40+00:00" + "time": "2023-06-16T13:40:37+00:00" }, { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", "phpbench/phpbench": "^0.16 || ^1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -1552,7 +1499,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -1568,35 +1515,37 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1628,7 +1577,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -1644,54 +1593,63 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-14T08:49:07+00:00" }, { "name": "doctrine/migrations", - "version": "v1.8.1", + "version": "3.5.5", "source": { "type": "git", "url": "https://github.com/doctrine/migrations.git", - "reference": "215438c0eef3e5f9b7da7d09c6b90756071b43e6" + "reference": "4b1e2b6ba71d21d0c5be22ed03b6fc954d20b204" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/migrations/zipball/215438c0eef3e5f9b7da7d09c6b90756071b43e6", - "reference": "215438c0eef3e5f9b7da7d09c6b90756071b43e6", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/4b1e2b6ba71d21d0c5be22ed03b6fc954d20b204", + "reference": "4b1e2b6ba71d21d0c5be22ed03b6fc954d20b204", "shasum": "" }, "require": { - "doctrine/dbal": "~2.6", - "ocramius/proxy-manager": "^1.0|^2.0", - "php": "^7.1", - "symfony/console": "~3.3|^4.0" + "composer-runtime-api": "^2", + "doctrine/dbal": "^3.5.1", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2.0", + "friendsofphp/proxy-manager-lts": "^1.0", + "php": "^7.4 || ^8.0", + "psr/log": "^1.1.3 || ^2 || ^3", + "symfony/console": "^4.4.16 || ^5.4 || ^6.0", + "symfony/stopwatch": "^4.4 || ^5.4 || ^6.0" + }, + "conflict": { + "doctrine/orm": "<2.12" }, "require-dev": { - "doctrine/coding-standard": "^1.0", - "doctrine/orm": "~2.5", - "jdorn/sql-formatter": "~1.1", - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "~7.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/yaml": "~3.3|^4.0" + "doctrine/coding-standard": "^9", + "doctrine/orm": "^2.13", + "doctrine/persistence": "^2 || ^3", + "doctrine/sql-formatter": "^1.0", + "ext-pdo_sqlite": "*", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan-symfony": "^1.1", + "phpunit/phpunit": "^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "symfony/process": "^4.4 || ^5.4 || ^6.0", + "symfony/yaml": "^4.4 || ^5.4 || ^6.0" }, "suggest": { - "jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command.", + "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", "symfony/yaml": "Allows the use of yaml for migration configuration files." }, "bin": [ "bin/doctrine-migrations" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "v1.8.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Migrations\\": "lib/Doctrine/Migrations", - "Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations" + "Doctrine\\Migrations\\": "lib/Doctrine/Migrations" } }, "notification-url": "https://packagist.org/downloads/", @@ -1712,67 +1670,91 @@ "email": "contact@mikesimonson.com" } ], - "description": "Database Schema migrations using Doctrine DBAL", + "description": "PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.", "homepage": "https://www.doctrine-project.org/projects/migrations.html", "keywords": [ "database", + "dbal", "migrations" ], "support": { "issues": "https://github.com/doctrine/migrations/issues", - "source": "https://github.com/doctrine/migrations/tree/1.8" + "source": "https://github.com/doctrine/migrations/tree/3.5.5" }, - "time": "2018-06-06T21:00:30+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fmigrations", + "type": "tidelift" + } + ], + "time": "2023-01-18T12:44:30+00:00" }, { "name": "doctrine/orm", - "version": "2.7.5", + "version": "2.15.4", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "01187c9260cd085529ddd1273665217cae659640" + "reference": "f7e4b61459692f9b747f40696e6bf72080390f2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/01187c9260cd085529ddd1273665217cae659640", - "reference": "01187c9260cd085529ddd1273665217cae659640", + "url": "https://api.github.com/repos/doctrine/orm/zipball/f7e4b61459692f9b747f40696e6bf72080390f2d", + "reference": "f7e4b61459692f9b747f40696e6bf72080390f2d", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.8", - "doctrine/annotations": "^1.11.1", - "doctrine/cache": "^1.9.1", - "doctrine/collections": "^1.5", - "doctrine/common": "^2.11 || ^3.0", - "doctrine/dbal": "^2.9.3", - "doctrine/event-manager": "^1.1", - "doctrine/inflector": "^1.0", - "doctrine/instantiator": "^1.3", - "doctrine/lexer": "^1.0", - "doctrine/persistence": "^1.3.3 || ^2.0", - "ext-pdo": "*", - "php": "^7.1", - "symfony/console": "^3.0|^4.0|^5.0" + "composer-runtime-api": "^2", + "doctrine/cache": "^1.12.1 || ^2.1.1", + "doctrine/collections": "^1.5 || ^2.1", + "doctrine/common": "^3.0.3", + "doctrine/dbal": "^2.13.1 || ^3.2", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2", + "doctrine/inflector": "^1.4 || ^2.0", + "doctrine/instantiator": "^1.3 || ^2", + "doctrine/lexer": "^2", + "doctrine/persistence": "^2.4 || ^3", + "ext-ctype": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3", + "symfony/console": "^4.2 || ^5.0 || ^6.0", + "symfony/polyfill-php72": "^1.23", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "doctrine/annotations": "<1.13 || >= 3.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.12.18", - "phpunit/phpunit": "^8.0", - "symfony/yaml": "^3.4|^4.0|^5.0", - "vimeo/psalm": "^3.11" + "doctrine/annotations": "^1.13 || ^2", + "doctrine/coding-standard": "^9.0.2 || ^12.0", + "phpbench/phpbench": "^0.16.10 || ^1.0", + "phpstan/phpstan": "~1.4.10 || 1.10.25", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "psr/log": "^1 || ^2 || ^3", + "squizlabs/php_codesniffer": "3.7.2", + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", + "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "vimeo/psalm": "4.30.0 || 5.13.1" }, "suggest": { + "ext-dom": "Provides support for XSD validation for XML mapping files", + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" }, "bin": [ "bin/doctrine" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\ORM\\": "lib/Doctrine/ORM" @@ -1812,51 +1794,47 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.7.5" + "source": "https://github.com/doctrine/orm/tree/2.15.4" }, - "time": "2020-12-03T08:52:14+00:00" + "time": "2023-07-18T07:50:04+00:00" }, { "name": "doctrine/persistence", - "version": "1.3.8", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "7a6eac9fb6f61bba91328f15aa7547f4806ca288" + "reference": "63fee8c33bef740db6730eb2a750cd3da6495603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/7a6eac9fb6f61bba91328f15aa7547f4806ca288", - "reference": "7a6eac9fb6f61bba91328f15aa7547f4806ca288", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/63fee8c33bef740db6730eb2a750cd3da6495603", + "reference": "63fee8c33bef740db6730eb2a750cd3da6495603", "shasum": "" }, "require": { - "doctrine/annotations": "^1.0", - "doctrine/cache": "^1.0", - "doctrine/collections": "^1.0", - "doctrine/event-manager": "^1.0", - "doctrine/reflection": "^1.2", - "php": "^7.1 || ^8.0" + "doctrine/event-manager": "^1 || ^2", + "php": "^7.2 || ^8.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0" }, "conflict": { - "doctrine/common": "<2.10@dev" + "doctrine/common": "<2.10" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^3.11" + "composer/package-versions-deprecated": "^1.11", + "doctrine/coding-standard": "^11", + "doctrine/common": "^3.0", + "phpstan/phpstan": "1.9.4", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "vimeo/psalm": "4.30.0 || 5.3.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common", - "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" + "Doctrine\\Persistence\\": "src/Persistence" } }, "notification-url": "https://packagist.org/downloads/", @@ -1890,7 +1868,7 @@ } ], "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "homepage": "https://doctrine-project.org/projects/persistence.html", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", "keywords": [ "mapper", "object", @@ -1900,7 +1878,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/1.3.x" + "source": "https://github.com/doctrine/persistence/tree/3.2.0" }, "funding": [ { @@ -1916,41 +1894,35 @@ "type": "tidelift" } ], - "time": "2020-06-20T12:56:16+00:00" + "time": "2023-05-17T18:32:04+00:00" }, { - "name": "doctrine/reflection", - "version": "1.2.3", + "name": "doctrine/sql-formatter", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/doctrine/reflection.git", - "reference": "1034e5e71f89978b80f9c1570e7226f6c3b9b6fb" + "url": "https://github.com/doctrine/sql-formatter.git", + "reference": "25a06c7bf4c6b8218f47928654252863ffc890a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/reflection/zipball/1034e5e71f89978b80f9c1570e7226f6c3b9b6fb", - "reference": "1034e5e71f89978b80f9c1570e7226f6c3b9b6fb", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/25a06c7bf4c6b8218f47928654252863ffc890a5", + "reference": "25a06c7bf4c6b8218f47928654252863ffc890a5", "shasum": "" }, "require": { - "doctrine/annotations": "^1.0", - "ext-tokenizer": "*", "php": "^7.1 || ^8.0" }, - "conflict": { - "doctrine/common": "<2.9" - }, "require-dev": { - "doctrine/coding-standard": "^9", - "doctrine/common": "^3.3", - "phpstan/phpstan": "^1.4.10", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" + "bamarni/composer-bin-plugin": "^1.4" }, + "bin": [ + "bin/sql-formatter" + ], "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" + "Doctrine\\SqlFormatter\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1959,64 +1931,43 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "https://jeremydorn.com/" } ], - "description": "The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some additional functionality on top of the reflection functionality that comes with PHP. It allows you to get the reflection information about classes, methods and properties statically.", - "homepage": "https://www.doctrine-project.org/projects/reflection.html", + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/doctrine/sql-formatter/", "keywords": [ - "reflection", - "static" + "highlight", + "sql" ], "support": { - "issues": "https://github.com/doctrine/reflection/issues", - "source": "https://github.com/doctrine/reflection/tree/1.2.3" + "issues": "https://github.com/doctrine/sql-formatter/issues", + "source": "https://github.com/doctrine/sql-formatter/tree/1.1.3" }, - "abandoned": "roave/better-reflection", - "time": "2022-05-31T18:46:25+00:00" + "time": "2022-05-23T21:33:49+00:00" }, { "name": "egulias/email-validator", - "version": "3.2.1", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715" + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/f88dcf4b14af14a98ad96b14b2b317969eab6715", - "reference": "f88dcf4b14af14a98ad96b14b2b317969eab6715", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", + "reference": "e5997fa97e8790cdae03a9cbd5e78e45e3c7bda7", "shasum": "" }, "require": { - "doctrine/lexer": "^1.2", + "doctrine/lexer": "^1.2|^2", "php": ">=7.2", "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^8.5.8|^9.3.3", "vimeo/psalm": "^4" }, @@ -2054,7 +2005,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.2.1" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.6" }, "funding": [ { @@ -2062,7 +2013,82 @@ "type": "github" } ], - "time": "2022-06-18T20:57:19+00:00" + "time": "2023-06-01T07:04:22+00:00" + }, + { + "name": "endroid/qr-code", + "version": "3.9.7", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "94563d7b3105288e6ac53a67ae720e3669fac1f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/94563d7b3105288e6ac53a67ae720e3669fac1f6", + "reference": "94563d7b3105288e6ac53a67ae720e3669fac1f6", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "khanamiryan/qrcode-detector-decoder": "^1.0.5", + "myclabs/php-enum": "^1.5", + "php": "^7.3||^8.0", + "symfony/options-resolver": "^3.4||^4.4||^5.0", + "symfony/property-access": "^3.4||^4.4||^5.0" + }, + "require-dev": { + "endroid/quality": "^1.5.2", + "setasign/fpdf": "^1.8" + }, + "suggest": { + "ext-gd": "Required for generating PNG images", + "roave/security-advisories": "Avoids installation of package versions with vulnerabilities", + "setasign/fpdf": "Required to use the FPDF writer.", + "symfony/security-checker": "Checks your composer.lock for vulnerabilities" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "description": "Endroid QR Code", + "homepage": "https://github.com/endroid/qr-code", + "keywords": [ + "bundle", + "code", + "endroid", + "php", + "qr", + "qrcode" + ], + "support": { + "issues": "https://github.com/endroid/qr-code/issues", + "source": "https://github.com/endroid/qr-code/tree/3.9.7" + }, + "funding": [ + { + "url": "https://github.com/endroid", + "type": "github" + } + ], + "time": "2021-04-20T19:10:54+00:00" }, { "name": "enshrined/svg-sanitize", @@ -2109,61 +2135,18 @@ }, "time": "2022-02-21T09:13:59+00:00" }, - { - "name": "exsyst/swagger", - "version": "v0.4.2", - "source": { - "type": "git", - "url": "https://github.com/GuilhemN/swagger.git", - "reference": "5d4ad40fe816b7783adc090b64fba6c392be64bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GuilhemN/swagger/zipball/5d4ad40fe816b7783adc090b64fba6c392be64bc", - "reference": "5d4ad40fe816b7783adc090b64fba6c392be64bc", - "shasum": "" - }, - "require": { - "php": "^7.0|^8.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.1.8|^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "EXSyst\\Component\\Swagger\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilhem Niot", - "email": "guilhem@gniot.fr" - } - ], - "description": "A php library to manipulate Swagger specifications", - "support": { - "issues": "https://github.com/GuilhemN/swagger/issues", - "source": "https://github.com/GuilhemN/swagger/tree/v0.4.2" - }, - "time": "2020-11-19T17:14:18+00:00" - }, { "name": "fossar/htmlawed", - "version": "1.3.1", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/fossar/HTMLawed.git", - "reference": "5bd4ce8bca395685a06f7dd18cc40832c77aa60f" + "reference": "2975518c538667c3749f91f949348b8ea9bf4855" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fossar/HTMLawed/zipball/5bd4ce8bca395685a06f7dd18cc40832c77aa60f", - "reference": "5bd4ce8bca395685a06f7dd18cc40832c77aa60f", + "url": "https://api.github.com/repos/fossar/HTMLawed/zipball/2975518c538667c3749f91f949348b8ea9bf4855", + "reference": "2975518c538667c3749f91f949348b8ea9bf4855", "shasum": "" }, "require": { @@ -2205,28 +2188,28 @@ ], "support": { "issues": "https://github.com/fossar/HTMLawed/issues", - "source": "https://github.com/fossar/HTMLawed/tree/1.3.1" + "source": "https://github.com/fossar/HTMLawed/tree/1.3.3" }, - "time": "2022-06-07T07:27:07+00:00" + "time": "2023-07-22T16:34:45+00:00" }, { "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.13", + "version": "v1.0.16", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "88354616f4cf4f6620910fd035e282173ba453e8" + "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/88354616f4cf4f6620910fd035e282173ba453e8", - "reference": "88354616f4cf4f6620910fd035e282173ba453e8", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/ecadbdc9052e4ad08c60c8a02268712e50427f7c", + "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c", "shasum": "" }, "require": { "laminas/laminas-code": "~3.4.1|^4.0", "php": ">=7.1", - "symfony/filesystem": "^4.4.17|^5.0|^6.0" + "symfony/filesystem": "^4.4.17|^5.0|^6.0|^7.0" }, "conflict": { "laminas/laminas-stdlib": "<3.2.1", @@ -2237,7 +2220,7 @@ }, "require-dev": { "ext-phar": "*", - "symfony/phpunit-bridge": "^5.4|^6.0" + "symfony/phpunit-bridge": "^5.4|^6.0|^7.0" }, "type": "library", "extra": { @@ -2277,7 +2260,7 @@ ], "support": { "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.13" + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.16" }, "funding": [ { @@ -2289,7 +2272,7 @@ "type": "tidelift" } ], - "time": "2022-10-17T19:48:16+00:00" + "time": "2023-05-24T07:17:17+00:00" }, { "name": "friendsofsymfony/jsrouting-bundle", @@ -2359,55 +2342,56 @@ }, { "name": "friendsofsymfony/oauth-server-bundle", - "version": "1.6.2", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git", - "reference": "fcaa25cc49474bdb0db7894f880976fe76ffed23" + "reference": "dc8ff343363cf794d30eb1a123610d186a43f162" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/zipball/fcaa25cc49474bdb0db7894f880976fe76ffed23", - "reference": "fcaa25cc49474bdb0db7894f880976fe76ffed23", + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/zipball/dc8ff343363cf794d30eb1a123610d186a43f162", + "reference": "dc8ff343363cf794d30eb1a123610d186a43f162", "shasum": "" }, "require": { "friendsofsymfony/oauth2-php": "~1.1", - "paragonie/random_compat": "^1|^2", - "php": "^5.5|^7.0", - "symfony/dependency-injection": "^2.8|~3.0|^4.0", - "symfony/framework-bundle": "~2.8|~3.0|^4.0", - "symfony/security-bundle": "~2.8|~3.0|^4.0" + "php": "^7.2 || ^8.0", + "symfony/dependency-injection": "^4.4 || ^5.1", + "symfony/framework-bundle": "^4.4 || ^5.1", + "symfony/security-bundle": "^4.4 || ^5.1", + "symfony/twig-bundle": "^4.4 || ^5.1" + }, + "conflict": { + "twig/twig": "<1.40 || >=2.0,<2.9" }, "require-dev": { - "doctrine/doctrine-bundle": "~1.0", - "doctrine/mongodb-odm": "~1.0", + "doctrine/doctrine-bundle": "^2.0", + "doctrine/mongodb-odm": "^2.2", "doctrine/orm": "~2.2", "phing/phing": "~2.4", - "php-mock/php-mock-phpunit": "^1.1", - "phpunit/phpunit": "~4.8|~5.0", - "propel/propel1": "^1.6.5", - "symfony/class-loader": "~2.8|~3.0|^4.0", - "symfony/console": "~2.8|~3.0|^4.0", - "symfony/form": "~2.8|~3.0|^4.0", - "symfony/phpunit-bridge": "~2.8|~3.0|^4.0", - "symfony/templating": "~2.8|~3.0|^4.0", - "symfony/twig-bundle": "~2.8|~3.0|^4.0", - "symfony/yaml": "~2.8|~3.0|^4.0", - "willdurand/propel-typehintable-behavior": "^1.0.4" + "php-mock/php-mock-phpunit": "^2.5", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "~0.9", + "phpunit/phpunit": "^8.5.23 || ^9.0", + "symfony/console": "^4.4 || ^5.1", + "symfony/form": "^4.4 || ^5.1", + "symfony/http-kernel": "^4.4 || ^5.1", + "symfony/phpunit-bridge": "^4.4 || ^5.1", + "symfony/security-core": "^4.4 || ^5.1", + "symfony/yaml": "^4.4 || ^5.1" }, "suggest": { "doctrine/doctrine-bundle": "*", "doctrine/mongodb-odm-bundle": "*", - "propel/propel-bundle": "If you want to use Propel with Symfony2, then you will have to install the PropelBundle", "symfony/console": "Needed to be able to use commands", - "symfony/form": "Needed to be able to use the AuthorizeFormType", - "willdurand/propel-typehintable-behavior": "The Typehintable behavior is useful to add type hints on generated methods, to be compliant with interfaces" + "symfony/form": "Needed to be able to use the AuthorizeFormType" }, + "default-branch": true, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -2441,9 +2425,9 @@ ], "support": { "issues": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/issues", - "source": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/tree/1.6" + "source": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/tree/master" }, - "time": "2019-01-23T15:23:04+00:00" + "time": "2022-03-24T10:22:23+00:00" }, { "name": "friendsofsymfony/oauth2-php", @@ -2508,74 +2492,70 @@ }, { "name": "friendsofsymfony/rest-bundle", - "version": "2.8.6", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git", - "reference": "369149f1de7f6519960fb1bb54c73e1b8c7dddcf" + "reference": "893f3a01e4d88789abc399c6f1b3cfff79238734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/369149f1de7f6519960fb1bb54c73e1b8c7dddcf", - "reference": "369149f1de7f6519960fb1bb54c73e1b8c7dddcf", + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/893f3a01e4d88789abc399c6f1b3cfff79238734", + "reference": "893f3a01e4d88789abc399c6f1b3cfff79238734", "shasum": "" }, "require": { - "doctrine/inflector": "^1.0", - "php": "^7.1|^8.0", - "psr/log": "^1.0", - "symfony/config": "^3.4|^4.3", - "symfony/debug": "^3.4|^4.3", - "symfony/dependency-injection": "^3.4|^4.3", - "symfony/event-dispatcher": "^3.4|^4.3", - "symfony/finder": "^3.4|^4.3", - "symfony/framework-bundle": "^3.4|^4.3", - "symfony/http-foundation": "^3.4|^4.3", - "symfony/http-kernel": "^3.4|^4.3", - "symfony/routing": "^3.4|^4.3", - "symfony/security-core": "^3.4|^4.3", - "willdurand/jsonp-callback-validator": "^1.0", + "php": "^7.2|^8.0", + "symfony/config": "^4.4|^5.3|^6.0", + "symfony/dependency-injection": "^4.4|^5.3|^6.0", + "symfony/event-dispatcher": "^4.4|^5.3|^6.0", + "symfony/framework-bundle": "^4.4.1|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.3|^6.0", + "symfony/http-kernel": "^4.4|^5.3|^6.0", + "symfony/routing": "^4.4|^5.3|^6.0", + "symfony/security-core": "^4.4|^5.3|^6.0", + "willdurand/jsonp-callback-validator": "^1.0|^2.0", "willdurand/negotiation": "^2.0|^3.0" }, "conflict": { - "doctrine/inflector": "1.4.0", + "doctrine/annotations": "<1.12", "jms/serializer": "<1.13.0", - "jms/serializer-bundle": "<2.0.0", - "sensio/framework-extra-bundle": "<3.0.13" + "jms/serializer-bundle": "<2.4.3|3.0.0", + "sensio/framework-extra-bundle": "<6.1", + "symfony/error-handler": "<4.4.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", + "doctrine/annotations": "^1.13.2", + "friendsofphp/php-cs-fixer": "^3.0", "jms/serializer": "^1.13|^2.0|^3.0", - "jms/serializer-bundle": "^2.3.1|^3.0", - "phpoption/phpoption": "^1.1", + "jms/serializer-bundle": "^2.4.3|^3.0.1|^4.0|^5.0", "psr/http-message": "^1.0", - "sensio/framework-extra-bundle": "^3.0.13|^4.0|^5.0", - "symfony/asset": "^3.4|^4.3", - "symfony/browser-kit": "^3.4|^4.3", - "symfony/css-selector": "^3.4|^4.3", - "symfony/expression-language": "^3.4|^4.3", - "symfony/form": "^3.4|^4.3", - "symfony/phpunit-bridge": "^5.2", - "symfony/security-bundle": "^3.4|^4.3", - "symfony/serializer": "^3.4|^4.3", - "symfony/templating": "^3.4|^4.3", - "symfony/twig-bundle": "^3.4|^4.3", - "symfony/validator": "^3.4|^4.3", - "symfony/web-profiler-bundle": "^3.4|^4.3", - "symfony/yaml": "^3.4|^4.3" + "psr/log": "^1.0|^2.0|^3.0", + "sensio/framework-extra-bundle": "^6.1", + "symfony/asset": "^4.4|^5.3|^6.0", + "symfony/browser-kit": "^4.4|^5.3|^6.0", + "symfony/css-selector": "^4.4|^5.3|^6.0", + "symfony/expression-language": "^4.4|^5.3|^6.0", + "symfony/form": "^4.4|^5.3|^6.0", + "symfony/mime": "^4.4|^5.3|^6.0", + "symfony/phpunit-bridge": "^5.3|^6.0", + "symfony/security-bundle": "^4.4|^5.3|^6.0", + "symfony/serializer": "^4.4|^5.3|^6.0", + "symfony/twig-bundle": "^4.4|^5.3|^6.0", + "symfony/validator": "^4.4|^5.3|^6.0", + "symfony/web-profiler-bundle": "^4.4|^5.3|^6.0", + "symfony/yaml": "^4.4|^5.3|^6.0" }, "suggest": { "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ^2.0|^3.0", "sensio/framework-extra-bundle": "Add support for the request body converter and the view response listener, requires ^3.0", - "symfony/expression-language": "Add support for using the expression language in the routing, requires ^2.7|^3.0", "symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ^2.7|^3.0", "symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ^2.7|^3.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "2.x-dev": "2.8-dev", - "dev-master": "2.7-dev" + "3.x-dev": "3.1-dev" } }, "autoload": { @@ -2612,52 +2592,62 @@ ], "support": { "issues": "https://github.com/FriendsOfSymfony/FOSRestBundle/issues", - "source": "https://github.com/FriendsOfSymfony/FOSRestBundle/tree/2.8.6" + "source": "https://github.com/FriendsOfSymfony/FOSRestBundle/tree/3.5.0" }, - "time": "2021-01-02T11:24:59+00:00" + "time": "2023-01-06T15:33:47+00:00" }, { "name": "friendsofsymfony/user-bundle", - "version": "v2.1.2", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/FriendsOfSymfony/FOSUserBundle.git", - "reference": "1049935edd24ec305cc6cfde1875372fa9600446" + "reference": "8ccde38910033bf4a32782c91becb5efb453133e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/1049935edd24ec305cc6cfde1875372fa9600446", - "reference": "1049935edd24ec305cc6cfde1875372fa9600446", + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/8ccde38910033bf4a32782c91becb5efb453133e", + "reference": "8ccde38910033bf4a32782c91becb5efb453133e", "shasum": "" }, "require": { - "paragonie/random_compat": "^1 || ^2", - "php": "^5.5.9 || ^7.0", - "symfony/form": "^2.8 || ^3.0 || ^4.0", - "symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0", - "symfony/security-bundle": "^2.8 || ^3.0 || ^4.0", - "symfony/templating": "^2.8 || ^3.0 || ^4.0", - "symfony/twig-bundle": "^2.8 || ^3.0 || ^4.0", - "symfony/validator": "^2.8 || ^3.0 || ^4.0", - "twig/twig": "^1.28 || ^2.0" + "ext-dom": "*", + "ext-json": "*", + "php": "^7.4 || ^8.0", + "symfony/config": "^4.4 || ^5.0 || ^6.0", + "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", + "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", + "symfony/event-dispatcher-contracts": "^1.1 || ^2.0 || ^3.0", + "symfony/form": "^4.4 || ^5.0 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", + "symfony/http-foundation": "^4.4 || ^5.0 || ^6.0", + "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.4 || ^5.0 || ^6.0", + "symfony/routing": "^4.4 || ^5.0 || ^6.0", + "symfony/security-bundle": "^4.4 || ^5.0 || ^6.0", + "symfony/security-core": "^4.4 || ^5.0 || ^6.0", + "symfony/translation": "^4.4 || ^5.0 || ^6.0", + "symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0", + "symfony/validator": "^4.4 || ^5.0 || ^6.0", + "twig/twig": "^1.34 || ^2.4 || ^3.0" }, "conflict": { "doctrine/doctrine-bundle": "<1.3", - "symfony/doctrine-bridge": "<2.7" + "doctrine/persistence": "<1.3", + "symfony/doctrine-bridge": "<4.4" }, "require-dev": { - "doctrine/doctrine-bundle": "^1.3", - "friendsofphp/php-cs-fixer": "^2.2", - "phpunit/phpunit": "^4.8.35|^5.7.11|^6.5", + "doctrine/doctrine-bundle": "^1.3 || ^2", + "friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0", "swiftmailer/swiftmailer": "^4.3 || ^5.0 || ^6.0", - "symfony/console": "^2.8 || ^3.0 || ^4.0", - "symfony/phpunit-bridge": "^2.8 || ^3.0 || ^4.0", - "symfony/yaml": "^2.8 || ^3.0 || ^4.0" + "symfony/console": "^4.4 || ^5.0 || ^6.0", + "symfony/phpunit-bridge": "^6.1", + "symfony/yaml": "^4.4 || ^5.0 || ^6.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { @@ -2678,11 +2668,11 @@ "email": "stof@notk.org" }, { - "name": "FriendsOfSymfony Community", - "homepage": "https://github.com/friendsofsymfony/FOSUserBundle/contributors" + "name": "Thibault Duplessis" }, { - "name": "Thibault Duplessis" + "name": "FriendsOfSymfony Community", + "homepage": "https://github.com/friendsofsymfony/FOSUserBundle/contributors" } ], "description": "Symfony FOSUserBundle", @@ -2693,52 +2683,58 @@ "support": { "docs": "https://symfony.com/doc/master/bundles/FOSUserBundle/index.html", "issues": "https://github.com/FriendsOfSymfony/FOSUserBundle/issues", - "source": "https://github.com/FriendsOfSymfony/FOSUserBundle/tree/v2.1.2" + "source": "https://github.com/FriendsOfSymfony/FOSUserBundle/tree/v3.2.1" }, - "time": "2018-03-08T08:59:27+00:00" + "time": "2023-07-06T10:38:55+00:00" }, { "name": "gedmo/doctrine-extensions", - "version": "v3.2.0", + "version": "v3.11.1", "source": { "type": "git", "url": "https://github.com/doctrine-extensions/DoctrineExtensions.git", - "reference": "8c02cee09e3dd43799ec3b84b619b19982c47f43" + "reference": "ae4bdf0d567e06b6bb1902a560ee78961b230953" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/8c02cee09e3dd43799ec3b84b619b19982c47f43", - "reference": "8c02cee09e3dd43799ec3b84b619b19982c47f43", + "url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/ae4bdf0d567e06b6bb1902a560ee78961b230953", + "reference": "ae4bdf0d567e06b6bb1902a560ee78961b230953", "shasum": "" }, "require": { "behat/transliterator": "~1.2", - "doctrine/annotations": "^1.13", - "doctrine/collections": "^1.0", + "doctrine/annotations": "^1.13 || ^2.0", + "doctrine/collections": "^1.2 || ^2.0", "doctrine/common": "^2.13 || ^3.0", - "doctrine/event-manager": "^1.0", - "php": "^7.2 || ^8.0" + "doctrine/event-manager": "^1.2 || ^2.0", + "doctrine/persistence": "^2.2 || ^3.0", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3", + "symfony/cache": "^4.4 || ^5.3 || ^6.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0" }, "conflict": { - "doctrine/mongodb": "<1.3", - "doctrine/mongodb-odm": "<2.0", - "doctrine/orm": ">=2.10", + "doctrine/cache": "<1.11", + "doctrine/dbal": "<2.13.1 || ^3.0 <3.2", + "doctrine/mongodb-odm": "<2.3", + "doctrine/orm": "<2.10.2", "sebastian/comparator": "<2.0" }, - "provide": { - "ext-mongo": "1.6.12" - }, "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", "doctrine/cache": "^1.11 || ^2.0", - "doctrine/dbal": "^2.13", + "doctrine/dbal": "^2.13.1 || ^3.2", "doctrine/doctrine-bundle": "^2.3", - "doctrine/mongodb-odm": "^2.0", - "doctrine/orm": "^2.9.6", - "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^8.5", - "symfony/cache": "^4.4 || ^5.0", - "symfony/yaml": "^4.1" + "doctrine/mongodb-odm": "^2.3", + "doctrine/orm": "^2.10.2", + "friendsofphp/php-cs-fixer": "^3.4.0,<3.10", + "nesbot/carbon": "^2.55", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-doctrine": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/console": "^4.4 || ^5.3 || ^6.0", + "symfony/phpunit-bridge": "^6.0", + "symfony/yaml": "^4.4 || ^5.3 || ^6.0" }, "suggest": { "doctrine/mongodb-odm": "to use the extensions with the MongoDB ODM", @@ -2748,7 +2744,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.12-dev" } }, "autoload": { @@ -2774,16 +2770,18 @@ "email": "david@liip.ch" } ], - "description": "Doctrine2 behavioral extensions", + "description": "Doctrine behavioral extensions", "homepage": "http://gediminasm.org/", "keywords": [ "Blameable", "behaviors", - "doctrine2", + "doctrine", "extensions", "gedmo", "loggable", "nestedset", + "odm", + "orm", "sluggable", "sortable", "timestampable", @@ -2794,10 +2792,10 @@ "support": { "email": "gediminas.morkevicius@gmail.com", "issues": "https://github.com/doctrine-extensions/DoctrineExtensions/issues", - "source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.2.0", + "source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.11.1", "wiki": "https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc" }, - "time": "2021-10-05T15:25:14+00:00" + "time": "2023-02-20T19:24:07+00:00" }, { "name": "grandt/binstring", @@ -3063,34 +3061,33 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -3127,7 +3124,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.0" }, "funding": [ { @@ -3143,47 +3140,48 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-05-21T13:50:22+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.9.0", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + "reference": "b635f279edd83fc275f822a1188157ffea568ff6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.9-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Psr7\\": "src/" } @@ -3222,6 +3220,11 @@ "name": "Tobias Schultze", "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -3237,7 +3240,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.0" + "source": "https://github.com/guzzle/psr7/tree/2.5.0" }, "funding": [ { @@ -3253,7 +3256,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:03+00:00" + "time": "2023-04-17T16:11:26+00:00" }, { "name": "guzzlehttp/ringphp", @@ -4489,16 +4492,16 @@ }, { "name": "j0k3r/graby", - "version": "2.4.2", + "version": "2.4.4", "source": { "type": "git", "url": "https://github.com/j0k3r/graby.git", - "reference": "f033c3b6787efdbabf04a3d7feb5c6a9205c8e1d" + "reference": "a8524b4c2847cf7c46c3e4153a57a5014b09f02e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/j0k3r/graby/zipball/f033c3b6787efdbabf04a3d7feb5c6a9205c8e1d", - "reference": "f033c3b6787efdbabf04a3d7feb5c6a9205c8e1d", + "url": "https://api.github.com/repos/j0k3r/graby/zipball/a8524b4c2847cf7c46c3e4153a57a5014b09f02e", + "reference": "a8524b4c2847cf7c46c3e4153a57a5014b09f02e", "shasum": "" }, "require": { @@ -4562,7 +4565,7 @@ "description": "Graby helps you extract article content from web pages", "support": { "issues": "https://github.com/j0k3r/graby/issues", - "source": "https://github.com/j0k3r/graby/tree/2.4.2" + "source": "https://github.com/j0k3r/graby/tree/2.4.4" }, "funding": [ { @@ -4570,20 +4573,20 @@ "type": "github" } ], - "time": "2022-11-04T05:45:17+00:00" + "time": "2023-03-07T14:02:51+00:00" }, { "name": "j0k3r/graby-site-config", - "version": "1.0.159", + "version": "1.0.171", "source": { "type": "git", "url": "https://github.com/j0k3r/graby-site-config.git", - "reference": "e5bfb9d608f0ce6390d6791ede196c769216ee84" + "reference": "1551b7a2a446d60b59866671d7125059a8753ecb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/e5bfb9d608f0ce6390d6791ede196c769216ee84", - "reference": "e5bfb9d608f0ce6390d6791ede196c769216ee84", + "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/1551b7a2a446d60b59866671d7125059a8753ecb", + "reference": "1551b7a2a446d60b59866671d7125059a8753ecb", "shasum": "" }, "require": { @@ -4612,9 +4615,9 @@ "description": "Graby site config files", "support": { "issues": "https://github.com/j0k3r/graby-site-config/issues", - "source": "https://github.com/j0k3r/graby-site-config/tree/1.0.159" + "source": "https://github.com/j0k3r/graby-site-config/tree/1.0.171" }, - "time": "2022-11-01T02:53:54+00:00" + "time": "2023-07-24T08:25:40+00:00" }, { "name": "j0k3r/httplug-ssrf-plugin", @@ -4831,80 +4834,30 @@ }, "time": "2017-11-15T13:41:13+00:00" }, - { - "name": "jdorn/sql-formatter", - "version": "v1.2.17", - "source": { - "type": "git", - "url": "https://github.com/jdorn/sql-formatter.git", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", - "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "lib" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jeremy Dorn", - "email": "jeremy@jeremydorn.com", - "homepage": "http://jeremydorn.com/" - } - ], - "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/jdorn/sql-formatter/", - "keywords": [ - "highlight", - "sql" - ], - "support": { - "issues": "https://github.com/jdorn/sql-formatter/issues", - "source": "https://github.com/jdorn/sql-formatter/tree/master" - }, - "time": "2014-01-12T16:20:24+00:00" - }, { "name": "jean85/pretty-package-versions", - "version": "1.6.0", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" }, "type": "library", "extra": { @@ -4927,7 +4880,7 @@ "email": "alessandro.lai85@gmail.com" } ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "description": "A library to get pretty versions strings of installed dependencies", "keywords": [ "composer", "package", @@ -4936,22 +4889,22 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" }, - "time": "2021-02-04T16:20:16+00:00" + "time": "2021-10-08T21:21:46+00:00" }, { "name": "jms/metadata", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/metadata.git", - "reference": "283c714831d272d78ddd6e52e08ac16d76be30fd" + "reference": "7ca240dcac0c655eb15933ee55736ccd2ea0d7a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/283c714831d272d78ddd6e52e08ac16d76be30fd", - "reference": "283c714831d272d78ddd6e52e08ac16d76be30fd", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/7ca240dcac0c655eb15933ee55736ccd2ea0d7a6", + "reference": "7ca240dcac0c655eb15933ee55736ccd2ea0d7a6", "shasum": "" }, "require": { @@ -4962,7 +4915,7 @@ "doctrine/coding-standard": "^8.0", "mikey179/vfsstream": "^1.6.7", "phpunit/phpunit": "^8.5|^9.0", - "psr/container": "^1.0", + "psr/container": "^1.0|^2.0", "symfony/cache": "^3.1|^4.0|^5.0", "symfony/dependency-injection": "^3.1|^4.0|^5.0" }, @@ -5000,28 +4953,28 @@ ], "support": { "issues": "https://github.com/schmittjoh/metadata/issues", - "source": "https://github.com/schmittjoh/metadata/tree/2.7.0" + "source": "https://github.com/schmittjoh/metadata/tree/2.8.0" }, - "time": "2022-09-13T19:18:27+00:00" + "time": "2023-02-15T13:44:18+00:00" }, { "name": "jms/serializer", - "version": "3.18.2", + "version": "3.27.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "329e29c323fb1e5c65b4ae4c77ba747678755a6c" + "reference": "e8c812460d7b47b15bc0ccd78901276bd44ad452" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/329e29c323fb1e5c65b4ae4c77ba747678755a6c", - "reference": "329e29c323fb1e5c65b4ae4c77ba747678755a6c", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/e8c812460d7b47b15bc0ccd78901276bd44ad452", + "reference": "e8c812460d7b47b15bc0ccd78901276bd44ad452", "shasum": "" }, "require": { - "doctrine/annotations": "^1.13", - "doctrine/instantiator": "^1.0.3", - "doctrine/lexer": "^1.1", + "doctrine/annotations": "^1.13 || ^2.0", + "doctrine/instantiator": "^1.0.3 || ^2.0", + "doctrine/lexer": "^2.0 || ^3.0", "jms/metadata": "^2.6", "php": "^7.2||^8.0", "phpstan/phpdoc-parser": "^0.4 || ^0.5 || ^1.0" @@ -5036,8 +4989,8 @@ "ocramius/proxy-manager": "^1.0|^2.0", "phpbench/phpbench": "^1.0", "phpstan/phpstan": "^1.0.2", - "phpunit/phpunit": "^8.5.21||^9.0", - "psr/container": "^1.0", + "phpunit/phpunit": "^8.5.21||^9.0||^10.0", + "psr/container": "^1.0|^2.0", "symfony/dependency-injection": "^3.0|^4.0|^5.0|^6.0", "symfony/expression-language": "^3.2|^4.0|^5.0|^6.0", "symfony/filesystem": "^3.0|^4.0|^5.0|^6.0", @@ -5079,7 +5032,7 @@ "email": "goetas@gmail.com" } ], - "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "description": "Library for (de-)serializing data of any complexity; supports XML, and JSON.", "homepage": "http://jmsyst.com/libs/serializer", "keywords": [ "deserialization", @@ -5090,7 +5043,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.18.2" + "source": "https://github.com/schmittjoh/serializer/tree/3.27.0" }, "funding": [ { @@ -5098,50 +5051,51 @@ "type": "github" } ], - "time": "2022-09-12T08:40:16+00:00" + "time": "2023-07-29T22:33:44+00:00" }, { "name": "jms/serializer-bundle", - "version": "3.10.0", + "version": "5.3.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/JMSSerializerBundle.git", - "reference": "1a030ecaf913b7a895eeaab04191cd7ff1810b46" + "reference": "3279738a958454793ca1e318a7dab6cfcff60124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/1a030ecaf913b7a895eeaab04191cd7ff1810b46", - "reference": "1a030ecaf913b7a895eeaab04191cd7ff1810b46", + "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/3279738a958454793ca1e318a7dab6cfcff60124", + "reference": "3279738a958454793ca1e318a7dab6cfcff60124", "shasum": "" }, "require": { "jms/metadata": "^2.5", - "jms/serializer": "^3.0", + "jms/serializer": "^3.20", "php": "^7.2 || ^8.0", - "symfony/dependency-injection": "^3.3 || ^4.0 || ^5.0", - "symfony/framework-bundle": "^3.0 || ^4.0 || ^5.0" + "symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/framework-bundle": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "doctrine/coding-standard": "^8.1", "doctrine/orm": "^2.4", "phpunit/phpunit": "^8.0 || ^9.0", - "symfony/expression-language": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/form": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0", - "symfony/twig-bundle": "*", - "symfony/validator": "^3.0 || ^4.0 || ^5.0", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "symfony/expression-language": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/finder": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/form": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/stopwatch": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/templating": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/twig-bundle": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/uid": "^5.1 || ^6.0", + "symfony/validator": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "suggest": { - "jms/di-extra-bundle": "Required to get lazy loading (de)serialization visitors, ^1.3", - "symfony/expression-language": "Required for opcache preloading, ^3.0 || ^4.0 || ^5.0", - "symfony/finder": "Required for cache warmup, supported versions ^3.0|^4.0" + "symfony/expression-language": "Required for opcache preloading ^3.4 || ^4.0 || ^5.0 || ^6.0", + "symfony/finder": "Required for cache warmup, supported versions ^3.4 || ^4.0 || ^5.0 || ^6.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "3.9-dev" + "dev-master": "5.x-dev" } }, "autoload": { @@ -5176,7 +5130,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/JMSSerializerBundle/issues", - "source": "https://github.com/schmittjoh/JMSSerializerBundle/tree/3.10.0" + "source": "https://github.com/schmittjoh/JMSSerializerBundle/tree/5.3.1" }, "funding": [ { @@ -5184,7 +5138,64 @@ "type": "github" } ], - "time": "2021-08-06T12:12:38+00:00" + "time": "2023-06-13T14:47:57+00:00" + }, + { + "name": "khanamiryan/qrcode-detector-decoder", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "45326fb83a2a375065dbb3a134b5b8a5872da569" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/45326fb83a2a375065dbb3a134b5b8a5872da569", + "reference": "45326fb83a2a375065dbb3a134b5b8a5872da569", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 | ^7.5 | ^8.0 | ^9.0", + "rector/rector": "^0.13.6", + "symplify/easy-coding-standard": "^11.0" + }, + "type": "library", + "autoload": { + "files": [ + "lib/Common/customFunctions.php" + ], + "psr-4": { + "Zxing\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Ashot Khanamiryan", + "email": "a.khanamiryan@gmail.com", + "homepage": "https://github.com/khanamiryan", + "role": "Developer" + } + ], + "description": "QR code decoder / reader", + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", + "keywords": [ + "barcode", + "qr", + "zxing" + ], + "support": { + "issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues", + "source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/1.0.6" + }, + "time": "2022-06-29T09:25:13+00:00" }, { "name": "kphoen/rulerz", @@ -5384,49 +5395,39 @@ }, { "name": "laminas/laminas-code", - "version": "3.4.1", + "version": "4.7.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-code.git", - "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766" + "reference": "91aabc066d5620428120800c0eafc0411e441a62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/1cb8f203389ab1482bf89c0e70a04849bacd7766", - "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/91aabc066d5620428120800c0eafc0411e441a62", + "reference": "91aabc066d5620428120800c0eafc0411e441a62", "shasum": "" }, "require": { - "laminas/laminas-eventmanager": "^2.6 || ^3.0", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.1" - }, - "conflict": { - "phpspec/prophecy": "<1.9.0" - }, - "replace": { - "zendframework/zend-code": "self.version" + "php": ">=7.4, <8.2" }, "require-dev": { - "doctrine/annotations": "^1.7", + "doctrine/annotations": "^1.13.2", "ext-phar": "*", - "laminas/laminas-coding-standard": "^1.0", - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "phpunit/phpunit": "^7.5.16 || ^8.4" + "laminas/laminas-coding-standard": "^2.3.0", + "laminas/laminas-stdlib": "^3.6.1", + "phpunit/phpunit": "^9.5.10", + "psalm/plugin-phpunit": "^0.17.0", + "vimeo/psalm": "^4.13.1" }, "suggest": { "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", "laminas/laminas-stdlib": "Laminas\\Stdlib component" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev", - "dev-develop": "3.5.x-dev", - "dev-dev-4.0": "4.0.x-dev" - } - }, "autoload": { + "files": [ + "polyfill/ReflectionEnumPolyfill.php" + ], "psr-4": { "Laminas\\Code\\": "src/" } @@ -5439,7 +5440,8 @@ "homepage": "https://laminas.dev", "keywords": [ "code", - "laminas" + "laminas", + "laminasframework" ], "support": { "chat": "https://laminas.dev/chat", @@ -5449,298 +5451,62 @@ "rss": "https://github.com/laminas/laminas-code/releases.atom", "source": "https://github.com/laminas/laminas-code" }, - "time": "2019-12-31T16:28:24+00:00" - }, - { - "name": "laminas/laminas-diactoros", - "version": "2.17.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "5b32597aa46b83c8b85bb1cf9a6ed4fe7dd980c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/5b32597aa46b83c8b85bb1cf9a6ed4fe7dd980c5", - "reference": "5b32597aa46b83c8b85bb1cf9a6ed4fe7dd980c5", - "shasum": "" - }, - "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "conflict": { - "zendframework/zend-diactoros": "*" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-gd": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "^2.4.0", - "php-http/psr7-integration-tests": "^1.1.1", - "phpunit/phpunit": "^9.5.23", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.24.0" - }, - "type": "library", - "extra": { - "laminas": { - "config-provider": "Laminas\\Diactoros\\ConfigProvider", - "module": "Laminas\\Diactoros" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php", - "src/functions/create_uploaded_file.legacy.php", - "src/functions/marshal_headers_from_sapi.legacy.php", - "src/functions/marshal_method_from_sapi.legacy.php", - "src/functions/marshal_protocol_version_from_sapi.legacy.php", - "src/functions/marshal_uri_from_sapi.legacy.php", - "src/functions/normalize_server.legacy.php", - "src/functions/normalize_uploaded_files.legacy.php", - "src/functions/parse_cookie_header.legacy.php" - ], - "psr-4": { - "Laminas\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "laminas", - "psr", - "psr-17", - "psr-7" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-diactoros/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-diactoros/issues", - "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", - "source": "https://github.com/laminas/laminas-diactoros" - }, "funding": [ { "url": "https://funding.communitybridge.org/projects/laminas-project", "type": "community_bridge" } ], - "time": "2022-08-30T17:01:46+00:00" + "time": "2022-11-21T01:32:31+00:00" }, { - "name": "laminas/laminas-eventmanager", - "version": "3.5.0", + "name": "lcobucci/clock", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "41f7209428f37cab9573365e361f4078209aaafa" + "url": "https://github.com/lcobucci/clock.git", + "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/41f7209428f37cab9573365e361f4078209aaafa", - "reference": "41f7209428f37cab9573365e361f4078209aaafa", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/353d83fe2e6ae95745b16b3d911813df6a05bfb3", + "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3", "shasum": "" }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" - }, - "conflict": { - "container-interop/container-interop": "<1.2", - "zendframework/zend-eventmanager": "*" + "php": "^7.4 || ^8.0" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.2.1", - "laminas/laminas-stdlib": "^3.6", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", - "psr/container": "^1.1.2 || ^2.0.2" - }, - "suggest": { - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", - "psr/container": "^1.1.2 || ^2.0.2, to use the lazy listeners feature" + "infection/infection": "^0.17", + "lcobucci/coding-standard": "^6.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/php-code-coverage": "9.1.4", + "phpunit/phpunit": "9.3.7" }, "type": "library", "autoload": { "psr-4": { - "Laminas\\EventManager\\": "src/" + "Lcobucci\\Clock\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "description": "Trigger and listen to events within a PHP application", - "homepage": "https://laminas.dev", - "keywords": [ - "event", - "eventmanager", - "events", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-eventmanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-eventmanager/issues", - "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", - "source": "https://github.com/laminas/laminas-eventmanager" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-04-06T21:05:17+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "e112dd2c099f4f6142c16fc65fda89a638e06885" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/e112dd2c099f4f6142c16fc65fda89a638e06885", - "reference": "e112dd2c099f4f6142c16fc65fda89a638e06885", - "shasum": "" - }, - "require": { - "php": ">=7.4, <8.2" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.14", - "psalm/plugin-phpunit": "^0.15.2", - "squizlabs/php_codesniffer": "^3.6.2", - "vimeo/psalm": "^4.21.0" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2022-07-29T13:28:29+00:00" - }, - { - "name": "lcobucci/jwt", - "version": "3.4.6", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "3ef8657a78278dfeae7707d51747251db4176240" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/3ef8657a78278dfeae7707d51747251db4176240", - "reference": "3ef8657a78278dfeae7707d51747251db4176240", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "^5.7 || ^7.3", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "lcobucci/clock": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "files": [ - "compat/class-aliases.php", - "compat/json-exception-polyfill.php", - "compat/lcobucci-clock-polyfill.php" - ], - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com" } ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], + "description": "Yet another clock abstraction", "support": { - "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/3.4.6" + "issues": "https://github.com/lcobucci/clock/issues", + "source": "https://github.com/lcobucci/clock/tree/2.0.x" }, "funding": [ { @@ -5752,41 +5518,112 @@ "type": "patreon" } ], - "time": "2021-09-28T19:18:28+00:00" + "time": "2020-08-27T18:56:02+00:00" }, { - "name": "lexik/form-filter-bundle", - "version": "v5.0.10", + "name": "lcobucci/jwt", + "version": "4.1.5", "source": { "type": "git", - "url": "https://github.com/lexik/LexikFormFilterBundle.git", - "reference": "92df0638173979dc906bda7a33a10b98429d2057" + "url": "https://github.com/lcobucci/jwt.git", + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lexik/LexikFormFilterBundle/zipball/92df0638173979dc906bda7a33a10b98429d2057", - "reference": "92df0638173979dc906bda7a33a10b98429d2057", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", "shasum": "" }, "require": { - "doctrine/orm": "^2.4.8", - "php": ">=5.5.9", - "symfony/form": "~2.8|~3.0|^4.0", - "symfony/framework-bundle": "~2.8|~3.0|^4.0" + "ext-hash": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-sodium": "*", + "lcobucci/clock": "^2.0", + "php": "^7.4 || ^8.0" }, "require-dev": { - "doctrine/mongodb-odm-bundle": "^3.0", - "phpunit/phpunit": "~5.0|^7.5" + "infection/infection": "^0.21", + "lcobucci/coding-standard": "^6.0", + "mikey179/vfsstream": "^1.6.7", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/php-invoker": "^3.1", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Cobucci", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "support": { + "issues": "https://github.com/lcobucci/jwt/issues", + "source": "https://github.com/lcobucci/jwt/tree/4.1.5" + }, + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2021-09-28T19:34:56+00:00" + }, + { + "name": "lexik/form-filter-bundle", + "version": "v7.0.3", + "source": { + "type": "git", + "url": "https://github.com/lexik/LexikFormFilterBundle.git", + "reference": "7588970d84c1604b98743588ba9020f6bddf6303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lexik/LexikFormFilterBundle/zipball/7588970d84c1604b98743588ba9020f6bddf6303", + "reference": "7588970d84c1604b98743588ba9020f6bddf6303", + "shasum": "" + }, + "require": { + "doctrine/orm": "^2.10", + "php": ">=7.1", + "symfony/form": "^4.4|^5.1|^6.0", + "symfony/framework-bundle": "^4.4|^5.1|^6.0" + }, + "require-dev": { + "doctrine/doctrine-bundle": "^1.8 || ^2.0", + "doctrine/mongodb-odm-bundle": "^4.1", + "symfony/phpunit-bridge": "^4.4|^5.1|^6.0", + "symfony/var-dumper": "^4.4|^5.1|^6.0" }, "suggest": { "alcaeus/mongo-php-adapter": "Install this package if using the PHP 7 MongoDB Driver" }, "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "5.x.x-dev" - } - }, "autoload": { "psr-4": { "Lexik\\Bundle\\FormFilterBundle\\": "" @@ -5797,13 +5634,13 @@ "MIT" ], "authors": [ - { - "name": "Dev Lexik", - "email": "dev@lexik.fr" - }, { "name": "Cedric Girard", "email": "c.girard@lexik.fr" + }, + { + "name": "Dev Lexik", + "email": "dev@lexik.fr" } ], "description": "This bundle aim to provide classes to build some form filters and then build a doctrine query from this form filter.", @@ -5817,32 +5654,31 @@ ], "support": { "issues": "https://github.com/lexik/LexikFormFilterBundle/issues", - "source": "https://github.com/lexik/LexikFormFilterBundle/tree/master" + "source": "https://github.com/lexik/LexikFormFilterBundle/tree/v7.0.3" }, - "time": "2019-04-17T17:58:44+00:00" + "abandoned": "spiriitlabs/form-filter-bundle", + "time": "2022-07-28T11:49:50+00:00" }, { "name": "masterminds/html5", - "version": "2.7.6", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947" + "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", + "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", - "ext-libxml": "*", "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" }, "type": "library", "extra": { @@ -5886,9 +5722,9 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.7.6" + "source": "https://github.com/Masterminds/html5-php/tree/2.8.0" }, - "time": "2022-08-18T16:18:26+00:00" + "time": "2023-04-26T07:27:39+00:00" }, { "name": "mgargano/simplehtmldom", @@ -6066,64 +5902,143 @@ "time": "2022-06-09T08:53:42+00:00" }, { - "name": "nelmio/api-doc-bundle", - "version": "v3.10.1", + "name": "myclabs/php-enum", + "version": "1.8.4", "source": { "type": "git", - "url": "https://github.com/nelmio/NelmioApiDocBundle.git", - "reference": "f5fb7a408824d44d36453f6edff20f9fa05296a1" + "url": "https://github.com/myclabs/php-enum.git", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/f5fb7a408824d44d36453f6edff20f9fa05296a1", - "reference": "f5fb7a408824d44d36453f6edff20f9fa05296a1", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", "shasum": "" }, "require": { - "exsyst/swagger": "^0.4.1", - "php": ">=7.1.3", + "ext-json": "*", + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^4.6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "support": { + "issues": "https://github.com/myclabs/php-enum/issues", + "source": "https://github.com/myclabs/php-enum/tree/1.8.4" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", + "type": "tidelift" + } + ], + "time": "2022-08-04T09:53:51+00:00" + }, + { + "name": "nelmio/api-doc-bundle", + "version": "v4.11.1", + "source": { + "type": "git", + "url": "https://github.com/nelmio/NelmioApiDocBundle.git", + "reference": "d40c4eb0c090675f3685f75712af331f02924462" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/d40c4eb0c090675f3685f75712af331f02924462", + "reference": "d40c4eb0c090675f3685f75712af331f02924462", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.11|^2.0", + "ext-json": "*", + "php": ">=7.2", "phpdocumentor/reflection-docblock": "^3.1|^4.0|^5.0", - "symfony/framework-bundle": "^3.4|^4.0|^5.0", - "symfony/options-resolver": "^3.4.4|^4.0|^5.0", - "symfony/property-info": "^3.4|^4.0|^5.0", - "zircote/swagger-php": "^2.0.9" + "psr/cache": "^1.0|^2.0|^3.0", + "psr/container": "^1.0|^2.0", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/framework-bundle": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", + "symfony/options-resolver": "^4.4|^5.0|^6.0", + "symfony/property-info": "^4.4|^5.0|^6.0", + "symfony/routing": "^4.4|^5.0|^6.0", + "zircote/swagger-php": "^4.2.15" }, "conflict": { "symfony/framework-bundle": "4.2.7" }, "require-dev": { - "api-platform/core": "^2.1.2", - "doctrine/annotations": "^1.2", - "doctrine/common": "^2.4", - "friendsofsymfony/rest-bundle": "^2.0|^3.0", + "api-platform/core": "^2.7.0|^3@dev", + "composer/package-versions-deprecated": "1.11.99.1", + "friendsofsymfony/rest-bundle": "^2.8|^3.0", "jms/serializer": "^1.14|^3.0", - "jms/serializer-bundle": "^2.3|^3.0", - "sensio/framework-extra-bundle": "^3.0.13|^4.0|^5.0", - "symfony/asset": "^3.4|^4.0|^5.0", - "symfony/browser-kit": "^3.4|^4.0|^5.0", - "symfony/cache": "^3.4|^4.0|^5.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/dom-crawler": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/form": "^3.4|^4.0|^5.0", - "symfony/phpunit-bridge": "^3.4.24|^4.0|^5.0", - "symfony/property-access": "^3.4|^4.0|^5.0", - "symfony/routing": "^3.4.42|^4.0|^5.0", - "symfony/stopwatch": "^3.4|^4.0|^5.0", - "symfony/templating": "^3.4|^4.0|^5.0", - "symfony/twig-bundle": "^3.4|^4.0|^5.0", - "symfony/validator": "^3.4|^4.0|^5.0", + "jms/serializer-bundle": "^2.3|^3.0|^4.0|^5.0@beta", + "sensio/framework-extra-bundle": "^4.4|^5.2|^6.0", + "symfony/asset": "^4.4|^5.2|^6.0", + "symfony/browser-kit": "^4.4|^5.2|^6.0", + "symfony/cache": "^4.4|^5.2|^6.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/dom-crawler": "^4.4|^5.2|^6.0", + "symfony/form": "^4.4|^5.2|^6.0", + "symfony/phpunit-bridge": "^5.2", + "symfony/property-access": "^4.4|^5.2|^6.0", + "symfony/serializer": "^4.4|^5.2|^6.0", + "symfony/stopwatch": "^4.4|^5.2|^6.0", + "symfony/templating": "^4.4|^5.2|^6.0", + "symfony/twig-bundle": "^4.4|^5.2|^6.0", + "symfony/validator": "^4.4|^5.2|^6.0", "willdurand/hateoas-bundle": "^1.0|^2.0" }, "suggest": { "api-platform/core": "For using an API oriented framework.", - "friendsofsymfony/rest-bundle": "For using the parameters annotations." + "friendsofsymfony/rest-bundle": "For using the parameters annotations.", + "jms/serializer-bundle": "For describing your models.", + "symfony/asset": "For using the Swagger UI.", + "symfony/cache": "For using a PSR-6 compatible cache implementation with the API doc generator.", + "symfony/form": "For describing your form type models.", + "symfony/monolog-bundle": "For using a PSR-3 compatible logger implementation with the API PHP describer.", + "symfony/serializer": "For describing your models.", + "symfony/twig-bundle": "For using the Swagger UI.", + "symfony/validator": "For describing the validation constraints in your models.", + "willdurand/hateoas-bundle": "For extracting HATEOAS metadata." }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-3.x": "3.7.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -6131,7 +6046,7 @@ "Nelmio\\ApiDocBundle\\": "" }, "exclude-from-classmap": [ - "/Tests/" + "Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -6157,36 +6072,36 @@ ], "support": { "issues": "https://github.com/nelmio/NelmioApiDocBundle/issues", - "source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v3.10.1" + "source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.11.1" }, - "time": "2021-12-11T13:22:14+00:00" + "time": "2023-02-01T07:18:39+00:00" }, { "name": "nelmio/cors-bundle", - "version": "1.5.6", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/nelmio/NelmioCorsBundle.git", - "reference": "10a24c10f242440211ed31075e74f81661c690d9" + "reference": "185d2c0ae50a3f0b628790170164d5f1c5b7c281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/10a24c10f242440211ed31075e74f81661c690d9", - "reference": "10a24c10f242440211ed31075e74f81661c690d9", + "url": "https://api.github.com/repos/nelmio/NelmioCorsBundle/zipball/185d2c0ae50a3f0b628790170164d5f1c5b7c281", + "reference": "185d2c0ae50a3f0b628790170164d5f1c5b7c281", "shasum": "" }, "require": { - "symfony/framework-bundle": "^2.7 || ^3.0 || ^4.0" + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0" }, "require-dev": { - "matthiasnoback/symfony-dependency-injection-test": "^1.0 || ^2.0", - "mockery/mockery": "^0.9 || ^1.0", - "symfony/phpunit-bridge": "^2.7 || ^3.0 || ^4.0" + "mockery/mockery": "^1.2", + "symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -6211,7 +6126,7 @@ "homepage": "https://github.com/nelmio/NelmioCorsBundle/contributors" } ], - "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony2 application", + "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application", "keywords": [ "api", "cors", @@ -6219,105 +6134,149 @@ ], "support": { "issues": "https://github.com/nelmio/NelmioCorsBundle/issues", - "source": "https://github.com/nelmio/NelmioCorsBundle/tree/1.5.6" + "source": "https://github.com/nelmio/NelmioCorsBundle/tree/2.3.1" }, - "time": "2019-06-17T08:53:14+00:00" + "time": "2023-02-16T08:49:29+00:00" }, { - "name": "pagerfanta/pagerfanta", - "version": "v2.7.3", + "name": "pagerfanta/core", + "version": "v3.8.0", "source": { "type": "git", - "url": "https://github.com/BabDev/Pagerfanta.git", - "reference": "5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b" + "url": "https://github.com/Pagerfanta/core.git", + "reference": "a995f69ff9af64a45c3dc3d8217100624ae214f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/BabDev/Pagerfanta/zipball/5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b", - "reference": "5f2aa1f1c9d1a6520f459e84b63e2bc25e9eea5b", + "url": "https://api.github.com/repos/Pagerfanta/core/zipball/a995f69ff9af64a45c3dc3d8217100624ae214f2", + "reference": "a995f69ff9af64a45c3dc3d8217100624ae214f2", "shasum": "" }, "require": { "ext-json": "*", - "php": "^7.2 || ^8.0", - "symfony/deprecation-contracts": "^2.1", + "php": "^7.4 || ^8.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", "symfony/polyfill-php80": "^1.15" }, - "conflict": { - "twig/twig": "<1.35 || >=2.0,<2.5" - }, - "replace": { - "pagerfanta/core": "self.version", - "pagerfanta/doctrine-collections-adapter": "self.version", - "pagerfanta/doctrine-dbal-adapter": "self.version", - "pagerfanta/doctrine-mongodb-odm-adapter": "self.version", - "pagerfanta/doctrine-orm-adapter": "self.version", - "pagerfanta/doctrine-phpcr-odm-adapter": "self.version", - "pagerfanta/elastica-adapter": "self.version", - "pagerfanta/solarium-adapter": "self.version", - "pagerfanta/twig": "self.version" - }, "require-dev": { - "dg/bypass-finals": "^1.3.1", - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/collections": "^1.4", - "doctrine/dbal": "^2.5 || ^3.0", - "doctrine/orm": "^2.5", - "doctrine/phpcr-odm": "^1.3", - "friendsofphp/php-cs-fixer": "^3.0", - "jackalope/jackalope-doctrine-dbal": "^1.3", - "mandango/mandango": "^1.0@dev", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^0.12.93", - "phpstan/phpstan-phpunit": "^0.12.21", - "phpunit/phpunit": "^8.5 || ^9.5", - "propel/propel": "^2.0@dev", - "propel/propel1": "^1.7", - "ruflin/elastica": "^1.3 || ^2.0 || ^3.0 || ^5.0 || ^6.0 || ^7.0", - "solarium/solarium": "^2.3 || ^3.0 || ^4.0 || ^5.0 || ^6.0", - "symfony/cache": "^4.4 || ^5.2 || ^6.0", - "twig/twig": "^1.35 || ^2.5 || ^3.0" - }, - "suggest": { - "twig/twig": "To integrate Pagerfanta with Twig" + "phpunit/phpunit": "^9.6 || ^10.0" }, "type": "library", "autoload": { "psr-4": { - "Pagerfanta\\": "lib/Core/", - "Pagerfanta\\Twig\\": "lib/Twig/", - "Pagerfanta\\Adapter\\": "src/Adapter/", - "Pagerfanta\\Elastica\\": "lib/Adapter/Elastica/", - "Pagerfanta\\Solarium\\": "lib/Adapter/Solarium/", - "Pagerfanta\\Doctrine\\ORM\\": "lib/Adapter/Doctrine/ORM/", - "Pagerfanta\\Doctrine\\DBAL\\": "lib/Adapter/Doctrine/DBAL/", - "Pagerfanta\\Doctrine\\PHPCRODM\\": "lib/Adapter/Doctrine/PHPCRODM/", - "Pagerfanta\\Doctrine\\MongoDBODM\\": "lib/Adapter/Doctrine/MongoDBODM/", - "Pagerfanta\\Doctrine\\Collections\\": "lib/Adapter/Doctrine/Collections/" - } + "Pagerfanta\\": "./" + }, + "exclude-from-classmap": [ + "Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Pagination for PHP", + "description": "Core Pagerfanta API", "keywords": [ - "page", - "pagination", - "paginator", - "paging" + "pagerfanta" ], "support": { - "issues": "https://github.com/BabDev/Pagerfanta/issues", - "source": "https://github.com/BabDev/Pagerfanta/tree/v2.7.3" + "source": "https://github.com/Pagerfanta/core/tree/v3.8.0" }, - "funding": [ - { - "url": "https://github.com/mbabker", - "type": "github" - } + "time": "2023-04-15T16:39:14+00:00" + }, + { + "name": "pagerfanta/doctrine-orm-adapter", + "version": "v3.8.0", + "source": { + "type": "git", + "url": "https://github.com/Pagerfanta/doctrine-orm-adapter.git", + "reference": "d0865fbfc7f8dd6e4c16f76135f904c60c3af3b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Pagerfanta/doctrine-orm-adapter/zipball/d0865fbfc7f8dd6e4c16f76135f904c60c3af3b5", + "reference": "d0865fbfc7f8dd6e4c16f76135f904c60c3af3b5", + "shasum": "" + }, + "require": { + "doctrine/orm": "^2.8", + "pagerfanta/core": "^3.0", + "php": "^7.4 || ^8.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0" + }, + "require-dev": { + "doctrine/annotations": "^1.11.1", + "doctrine/cache": "^1.11 || ^2.0", + "phpunit/phpunit": "^9.6 || ^10.0", + "symfony/cache": "^4.4 || ^5.4 || ^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Pagerfanta\\Doctrine\\ORM\\": "./" + }, + "exclude-from-classmap": [ + "Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2022-03-03T00:01:24+00:00" + "description": "Pagerfanta adapter for Doctrine ORM", + "keywords": [ + "doctrine", + "orm", + "pagerfanta" + ], + "support": { + "source": "https://github.com/Pagerfanta/doctrine-orm-adapter/tree/v3.8.0" + }, + "time": "2023-04-15T16:39:14+00:00" + }, + { + "name": "pagerfanta/twig", + "version": "v3.8.0", + "source": { + "type": "git", + "url": "https://github.com/Pagerfanta/twig.git", + "reference": "19ba831401d7bc5249997c09c574e5c922773b12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Pagerfanta/twig/zipball/19ba831401d7bc5249997c09c574e5c922773b12", + "reference": "19ba831401d7bc5249997c09c574e5c922773b12", + "shasum": "" + }, + "require": { + "pagerfanta/core": "^3.0", + "php": "^7.4 || ^8.0", + "symfony/polyfill-php80": "^1.15", + "twig/twig": "^2.13 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Pagerfanta\\Twig\\": "./" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Twig integration for Pagerfanta", + "keywords": [ + "pagerfanta" + ], + "support": { + "source": "https://github.com/Pagerfanta/twig/tree/v3.8.0" + }, + "time": "2023-04-15T16:39:14+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -6388,33 +6347,29 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.21", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/96c132c7f2f7bc3230723b66e89f8f150b29d5ae", - "reference": "96c132c7f2f7bc3230723b66e89f8f150b29d5ae", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">= 7" }, "require-dev": { - "phpunit/phpunit": "*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -6438,26 +6393,26 @@ "issues": "https://github.com/paragonie/random_compat/issues", "source": "https://github.com/paragonie/random_compat" }, - "time": "2022-02-16T17:07:03+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "php-amqplib/php-amqplib", - "version": "v2.12.3", + "version": "v3.5.4", "source": { "type": "git", "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "f746eb44df6d8f838173729867dd1d20b0265faa" + "reference": "1aecbd182b35eb039667c50d7d92d71f105be779" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/f746eb44df6d8f838173729867dd1d20b0265faa", - "reference": "f746eb44df6d8f838173729867dd1d20b0265faa", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/1aecbd182b35eb039667c50d7d92d71f105be779", + "reference": "1aecbd182b35eb039667c50d7d92d71f105be779", "shasum": "" }, "require": { "ext-mbstring": "*", "ext-sockets": "*", - "php": ">=5.6.3,<8.0", + "php": "^7.1||^8.0", "phpseclib/phpseclib": "^2.0|^3.0" }, "conflict": { @@ -6469,13 +6424,13 @@ "require-dev": { "ext-curl": "*", "nategood/httpful": "^0.2.20", - "phpunit/phpunit": "^5.7|^6.5|^7.0", - "squizlabs/php_codesniffer": "^3.5" + "phpunit/phpunit": "^7.5|^9.5", + "squizlabs/php_codesniffer": "^3.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.12-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -6517,43 +6472,48 @@ ], "support": { "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v2.12.3" + "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.5.4" }, - "time": "2021-03-01T12:21:31+00:00" + "time": "2023-07-01T11:25:08+00:00" }, { "name": "php-amqplib/rabbitmq-bundle", - "version": "v1.15.1", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/php-amqplib/RabbitMqBundle.git", - "reference": "5d46fd892e5f6ac0540195846fbcf32c8086bf74" + "reference": "b2265a87aa35907beb3593c182d340a220b60461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/RabbitMqBundle/zipball/5d46fd892e5f6ac0540195846fbcf32c8086bf74", - "reference": "5d46fd892e5f6ac0540195846fbcf32c8086bf74", + "url": "https://api.github.com/repos/php-amqplib/RabbitMqBundle/zipball/b2265a87aa35907beb3593c182d340a220b60461", + "reference": "b2265a87aa35907beb3593c182d340a220b60461", "shasum": "" }, "require": { - "php": "^5.3.9|^7.0", - "php-amqplib/php-amqplib": "^2.6", - "psr/log": "^1.0", - "symfony/config": "^2.7|^3.0|^4.0", - "symfony/console": "^2.7|^3.0|^4.0", - "symfony/dependency-injection": "^2.7|^3.0|^4.0", - "symfony/event-dispatcher": "^2.7|^3.0|^4.0", - "symfony/yaml": "^2.7|^3.0|^4.0" + "php": "^7.4|^8.0", + "php-amqplib/php-amqplib": "^2.12.2|^3.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/config": "^4.4|^5.3|^6.0", + "symfony/console": "^4.4|^5.3|^6.0", + "symfony/dependency-injection": "^4.4|^5.3|^6.0", + "symfony/event-dispatcher": "^4.4|^5.3|^6.0", + "symfony/framework-bundle": "^4.4|^5.3|^6.0", + "symfony/http-kernel": "^4.4|^5.3|^6.0", + "symfony/yaml": "^4.4|^5.3|^6.0" }, "replace": { + "emag-tech-labs/rabbitmq-bundle": "self.version", "oldsound/rabbitmq-bundle": "self.version" }, "require-dev": { - "phpunit/phpunit": "^4.8.35|^5.4.3", - "symfony/debug": "^2.7|^3.0|^4.0", - "symfony/serializer": "^2.7|^3.0|^4.0" + "phpstan/phpstan": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/serializer": "^4.4|^5.3|^6.0" }, "suggest": { + "ext-pcntl": "*", "symfony/framework-bundle": "To use this lib as a full Symfony Bundle and to use the profiler data collector" }, "type": "symfony-bundle", @@ -6579,45 +6539,43 @@ "name": "Alvaro Videla" } ], - "description": "Integrates php-amqplib with Symfony & RabbitMq. Formerly oldsound/rabbitmq-bundle.", + "description": "Integrates php-amqplib with Symfony & RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.", "keywords": [ "AMQP", - "Symfony2", "message", "queue", "rabbitmq", "symfony", - "symfony3", - "symfony4" + "symfony4", + "symfony5" ], "support": { "issues": "https://github.com/php-amqplib/RabbitMqBundle/issues", - "source": "https://github.com/php-amqplib/RabbitMqBundle/tree/v1.15.1" + "source": "https://github.com/php-amqplib/RabbitMqBundle/tree/2.11.0" }, - "time": "2019-12-06T16:27:58+00:00" + "time": "2021-12-21T13:13:45+00:00" }, { "name": "php-http/client-common", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0" + "reference": "880509727a447474d2a71b7d7fa5d268ddd3db4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/45db684cd4e186dcdc2b9c06b22970fe123796c0", - "reference": "45db684cd4e186dcdc2b9c06b22970fe123796c0", + "url": "https://api.github.com/repos/php-http/client-common/zipball/880509727a447474d2a71b7d7fa5d268ddd3db4b", + "reference": "880509727a447474d2a71b7d7fa5d268ddd3db4b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", "php-http/httplug": "^2.0", "php-http/message": "^1.6", - "php-http/message-factory": "^1.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0", "symfony/polyfill-php80": "^1.17" }, @@ -6627,7 +6585,7 @@ "nyholm/psr7": "^1.2", "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "phpspec/prophecy": "^1.10.2", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + "phpunit/phpunit": "^7.5.20 || ^8.5.33 || ^9.6.7" }, "suggest": { "ext-json": "To detect JSON responses with the ContentTypePlugin", @@ -6637,11 +6595,6 @@ "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, "autoload": { "psr-4": { "Http\\Client\\Common\\": "src/" @@ -6667,49 +6620,59 @@ ], "support": { "issues": "https://github.com/php-http/client-common/issues", - "source": "https://github.com/php-http/client-common/tree/2.6.0" + "source": "https://github.com/php-http/client-common/tree/2.7.0" }, - "time": "2022-09-29T09:59:43+00:00" + "time": "2023-05-17T06:46:59+00:00" }, { "name": "php-http/discovery", - "version": "1.14.3", + "version": "1.19.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735" + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/31d8ee46d0215108df16a8527c7438e96a4d7735", - "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735", + "url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e", + "reference": "57f3de01d32085fea20865f9b16fb0e69347c39e", "shasum": "" }, "require": { + "composer-plugin-api": "^1.0|^2.0", "php": "^7.1 || ^8.0" }, "conflict": { - "nyholm/psr7": "<1.0" + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" }, "require-dev": { + "composer/composer": "^1.0.2|^2.0", "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1" + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", + "symfony/phpunit-bridge": "^6.2" }, - "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" - }, - "type": "library", + "type": "composer-plugin", "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } + "class": "Http\\Discovery\\Composer\\Plugin", + "plugin-optional": true }, "autoload": { "psr-4": { "Http\\Discovery\\": "src/" - } + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6721,7 +6684,7 @@ "email": "mark.sagikazar@gmail.com" } ], - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", "homepage": "http://php-http.org", "keywords": [ "adapter", @@ -6730,13 +6693,14 @@ "factory", "http", "message", + "psr17", "psr7" ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.14.3" + "source": "https://github.com/php-http/discovery/tree/1.19.1" }, - "time": "2022-07-11T14:04:40+00:00" + "time": "2023-07-11T07:02:26+00:00" }, { "name": "php-http/guzzle5-adapter", @@ -6807,34 +6771,29 @@ }, { "name": "php-http/httplug", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "f640739f80dfa1152533976e3c112477f69274eb" + "reference": "625ad742c360c8ac580fcc647a1541d29e257f67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", - "reference": "f640739f80dfa1152533976e3c112477f69274eb", + "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67", + "reference": "625ad742c360c8ac580fcc647a1541d29e257f67", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", "php-http/promise": "^1.1", "psr/http-client": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.1", - "phpspec/phpspec": "^5.1 || ^6.0" + "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0", + "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "psr-4": { "Http\\Client\\": "src/" @@ -6863,22 +6822,22 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/2.3.0" + "source": "https://github.com/php-http/httplug/tree/2.4.0" }, - "time": "2022-02-21T09:52:22+00:00" + "time": "2023-04-14T15:10:03+00:00" }, { "name": "php-http/httplug-bundle", - "version": "1.27.0", + "version": "1.29.1", "source": { "type": "git", "url": "https://github.com/php-http/HttplugBundle.git", - "reference": "dda96d44338b68a1db4ee0b06fa596583a0e75c4" + "reference": "7c638710c3d4d4fe14de9e28e9a98c073a289cea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/HttplugBundle/zipball/dda96d44338b68a1db4ee0b06fa596583a0e75c4", - "reference": "dda96d44338b68a1db4ee0b06fa596583a0e75c4", + "url": "https://api.github.com/repos/php-http/HttplugBundle/zipball/7c638710c3d4d4fe14de9e28e9a98c073a289cea", + "reference": "7c638710c3d4d4fe14de9e28e9a98c073a289cea", "shasum": "" }, "require": { @@ -6886,12 +6845,12 @@ "php-http/client-common": "^1.9 || ^2.0", "php-http/client-implementation": "^1.0", "php-http/discovery": "^1.14", - "php-http/httplug": "^1.0 || ^2.0", + "php-http/httplug": "^2.0", "php-http/logger-plugin": "^1.1", "php-http/message": "^1.4", "php-http/message-factory": "^1.0.2", "php-http/stopwatch-plugin": "^1.2", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "symfony/config": "^4.4 || ^5.0 || ^6.0", "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", @@ -6900,10 +6859,11 @@ }, "conflict": { "php-http/curl-client": "<2.0", - "php-http/guzzle6-adapter": "<1.1" + "php-http/guzzle6-adapter": "<1.1", + "php-http/socket-client": "<2.0" }, "require-dev": { - "guzzlehttp/psr7": "^1.7", + "guzzlehttp/psr7": "^1.7 || ^2.0", "matthiasnoback/symfony-dependency-injection-test": "^4.0", "nyholm/nsa": "^1.1", "nyholm/psr7": "^1.2.1", @@ -6927,11 +6887,6 @@ "twig/twig": "Add this to your require-dev section when using the WebProfilerBundle" }, "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { "Http\\HttplugBundle\\": "src/" @@ -6968,9 +6923,9 @@ ], "support": { "issues": "https://github.com/php-http/HttplugBundle/issues", - "source": "https://github.com/php-http/HttplugBundle/tree/1.27.0" + "source": "https://github.com/php-http/HttplugBundle/tree/1.29.1" }, - "time": "2022-07-25T14:18:05+00:00" + "time": "2023-06-01T08:55:47+00:00" }, { "name": "php-http/logger-plugin", @@ -7033,23 +6988,22 @@ }, { "name": "php-http/message", - "version": "1.13.0", + "version": "1.16.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361" + "reference": "47a14338bf4ebd67d317bf1144253d7db4ab55fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361", - "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361", + "url": "https://api.github.com/repos/php-http/message/zipball/47a14338bf4ebd67d317bf1144253d7db4ab55fd", + "reference": "47a14338bf4ebd67d317bf1144253d7db4ab55fd", "shasum": "" }, "require": { "clue/stream-filter": "^1.5", - "php": "^7.1 || ^8.0", - "php-http/message-factory": "^1.0.2", - "psr/http-message": "^1.0" + "php": "^7.2 || ^8.0", + "psr/http-message": "^1.1 || ^2.0" }, "provide": { "php-http/message-factory-implementation": "1.0" @@ -7057,8 +7011,9 @@ "require-dev": { "ergebnis/composer-normalize": "^2.6", "ext-zlib": "*", - "guzzlehttp/psr7": "^1.0", - "laminas/laminas-diactoros": "^2.0", + "guzzlehttp/psr7": "^1.0 || ^2.0", + "laminas/laminas-diactoros": "^2.0 || ^3.0", + "php-http/message-factory": "^1.0.2", "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0" }, @@ -7069,11 +7024,6 @@ "slim/slim": "Used with Slim Framework PSR-7 implementation" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, "autoload": { "files": [ "src/filters.php" @@ -7101,32 +7051,32 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.13.0" + "source": "https://github.com/php-http/message/tree/1.16.0" }, - "time": "2022-02-11T13:41:14+00:00" + "time": "2023-05-17T06:43:38+00:00" }, { "name": "php-http/message-factory", - "version": "v1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57", + "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57", "shasum": "" }, "require": { "php": ">=5.4", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -7155,9 +7105,10 @@ ], "support": { "issues": "https://github.com/php-http/message-factory/issues", - "source": "https://github.com/php-http/message-factory/tree/master" + "source": "https://github.com/php-http/message-factory/tree/1.1.0" }, - "time": "2015-12-19T14:08:53+00:00" + "abandoned": "psr/http-factory", + "time": "2023-04-14T14:16:17+00:00" }, { "name": "php-http/promise", @@ -7386,24 +7337,27 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.2", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", @@ -7435,22 +7389,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" }, - "time": "2022-10-14T12:47:21+00:00" + "time": "2023-05-30T18:13:47+00:00" }, { "name": "phpseclib/phpseclib", - "version": "3.0.17", + "version": "3.0.20", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761" + "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/dbc2307d5c69aeb22db136c52e91130d7f2ca761", - "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", + "reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67", "shasum": "" }, "require": { @@ -7531,7 +7485,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.17" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.20" }, "funding": [ { @@ -7547,26 +7501,28 @@ "type": "tidelift" } ], - "time": "2022-10-24T10:51:50+00:00" + "time": "2023-06-13T06:30:34+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.14.0", + "version": "1.23.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "df1a79430e14e30cd192fe6c05842133d076e58d" + "reference": "a2b24135c35852b348894320d47b3902a94bc494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/df1a79430e14e30cd192fe6c05842133d076e58d", - "reference": "df1a79430e14e30cd192fe6c05842133d076e58d", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a2b24135c35852b348894320d47b3902a94bc494", + "reference": "a2b24135c35852b348894320d47b3902a94bc494", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -7590,9 +7546,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.14.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.0" }, - "time": "2022-11-27T19:09:16+00:00" + "time": "2023-07-23T22:17:56+00:00" }, { "name": "phpzip/phpzip", @@ -7796,34 +7752,30 @@ }, { "name": "predis/predis", - "version": "v2.0.3", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/predis/predis.git", - "reference": "ff59f745815150c65ed388f7d64e7660fe961771" + "reference": "33b70b971a32b0d28b4f748b0547593dce316e0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/ff59f745815150c65ed388f7d64e7660fe961771", - "reference": "ff59f745815150c65ed388f7d64e7660fe961771", + "url": "https://api.github.com/repos/predis/predis/zipball/33b70b971a32b0d28b4f748b0547593dce316e0d", + "reference": "33b70b971a32b0d28b4f748b0547593dce316e0d", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "friendsofphp/php-cs-fixer": "^3.3", + "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^8.0 || ~9.4.4" }, "suggest": { - "ext-curl": "Allows access to Webdis when paired with phpiredis", - "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" + "ext-relay": "Faster connection with in-memory caching (>=0.6.2)" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.0-dev" - } - }, "autoload": { "psr-4": { "Predis\\": "src/" @@ -7834,12 +7786,6 @@ "MIT" ], "authors": [ - { - "name": "Daniele Alessandri", - "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net", - "role": "Creator & Maintainer" - }, { "name": "Till Krüss", "homepage": "https://till.im", @@ -7855,7 +7801,7 @@ ], "support": { "issues": "https://github.com/predis/predis/issues", - "source": "https://github.com/predis/predis/tree/v2.0.3" + "source": "https://github.com/predis/predis/tree/v2.2.0" }, "funding": [ { @@ -7863,7 +7809,7 @@ "type": "github" } ], - "time": "2022-10-11T16:52:29+00:00" + "time": "2023-06-14T10:37:31+00:00" }, { "name": "psr/cache", @@ -7964,21 +7910,21 @@ }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -7998,7 +7944,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -8010,27 +7956,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client/tree/1.0.2" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-04-10T20:12:12+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -8050,7 +7996,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -8065,31 +8011,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -8118,9 +8064,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/link", @@ -8321,23 +8267,23 @@ }, { "name": "react/promise", - "version": "v2.9.0", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -8381,67 +8327,38 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" + "source": "https://github.com/reactphp/promise/tree/v2.10.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-02-11T10:27:51+00:00" + "time": "2023-05-02T15:15:43+00:00" }, { - "name": "scheb/two-factor-bundle", - "version": "v4.18.4", + "name": "scheb/2fa-backup-code", + "version": "v5.13.2", "source": { "type": "git", - "url": "https://github.com/scheb/two-factor-bundle.git", - "reference": "78f5832d59ec49491ef27edc0fa03a3110139f5c" + "url": "https://github.com/scheb/2fa-backup-code.git", + "reference": "5584eb7a2c3deb80635c7173ad77858e51129c35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scheb/two-factor-bundle/zipball/78f5832d59ec49491ef27edc0fa03a3110139f5c", - "reference": "78f5832d59ec49491ef27edc0fa03a3110139f5c", + "url": "https://api.github.com/repos/scheb/2fa-backup-code/zipball/5584eb7a2c3deb80635c7173ad77858e51129c35", + "reference": "5584eb7a2c3deb80635c7173ad77858e51129c35", "shasum": "" }, "require": { - "lcobucci/jwt": "^3.2", - "paragonie/constant_time_encoding": "^2.2", - "php": ">=7.1.3", - "spomky-labs/otphp": "^9.1|^10.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^3.4|^4.0|^5.0", - "symfony/framework-bundle": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/http-kernel": "^3.4|^4.0|^5.0", - "symfony/property-access": "^3.4|^4.0|^5.0", - "symfony/security-bundle": "^3.4|^4.0|^5.0", - "symfony/twig-bundle": "^3.4|^4.0|^5.0" + "scheb/2fa-bundle": "self.version" }, - "require-dev": { - "doctrine/persistence": "^1.3|^2.0", - "escapestudios/symfony2-coding-standard": "^3.9", - "phpunit/phpunit": "^7.0|^8.0|^9.0", - "squizlabs/php_codesniffer": "^3.5", - "swiftmailer/swiftmailer": "^6.0", - "symfony/polyfill-php80": "^1.15", - "symfony/yaml": "^3.4|^4.0|^5.0", - "vimeo/psalm": "^3.11" - }, - "type": "symfony-bundle", + "type": "library", "autoload": { "psr-4": { "Scheb\\TwoFactorBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -8453,8 +8370,77 @@ "email": "me@christianscheb.de" } ], - "description": "Provides two-factor authentication for Symfony applications", - "homepage": "https://github.com/scheb/two-factor-bundle", + "description": "Extends scheb/2fa-bundle with backup codes support", + "homepage": "https://github.com/scheb/2fa", + "keywords": [ + "2fa", + "Authentication", + "backup-codes", + "symfony", + "two-factor", + "two-step" + ], + "support": { + "source": "https://github.com/scheb/2fa-backup-code/tree/v5.13.2" + }, + "time": "2022-01-03T10:21:24+00:00" + }, + { + "name": "scheb/2fa-bundle", + "version": "v5.13.2", + "source": { + "type": "git", + "url": "https://github.com/scheb/2fa-bundle.git", + "reference": "dc575cc7bc94fa3a52b547698086f2ef015d2e81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scheb/2fa-bundle/zipball/dc575cc7bc94fa3a52b547698086f2ef015d2e81", + "reference": "dc575cc7bc94fa3a52b547698086f2ef015d2e81", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.2.5", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/framework-bundle": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/property-access": "^4.4|^5.0", + "symfony/security-bundle": "^4.4.1|^5.0", + "symfony/twig-bundle": "^4.4|^5.0" + }, + "conflict": { + "scheb/two-factor-bundle": "*" + }, + "suggest": { + "scheb/2fa-backup-code": "Emergency codes when you have no access to other methods", + "scheb/2fa-email": "Send codes by email", + "scheb/2fa-google-authenticator": "Google Authenticator support", + "scheb/2fa-qr-code": "Generate QR codes for Google Authenticator / TOTP", + "scheb/2fa-totp": "Temporary one-time password (TOTP) support (Google Authenticator compatible)", + "scheb/2fa-trusted-device": "Trusted devices support" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Scheb\\TwoFactorBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Scheb", + "email": "me@christianscheb.de" + } + ], + "description": "A generic interface to implement two-factor authentication in Symfony applications", + "homepage": "https://github.com/scheb/2fa", "keywords": [ "2fa", "Authentication", @@ -8463,33 +8449,227 @@ "two-step" ], "support": { - "issues": "https://github.com/scheb/two-factor-bundle/issues", - "source": "https://github.com/scheb/two-factor-bundle/tree/v4.18.4" + "source": "https://github.com/scheb/2fa-bundle/tree/v5.13.2" }, - "abandoned": "scheb/2fa-bundle", - "time": "2020-10-30T19:24:18+00:00" + "time": "2022-04-16T10:18:34+00:00" }, { - "name": "sensio/framework-extra-bundle", - "version": "v5.6.1", + "name": "scheb/2fa-email", + "version": "v5.13.2", "source": { "type": "git", - "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "430d14c01836b77c28092883d195a43ce413ee32" + "url": "https://github.com/scheb/2fa-email.git", + "reference": "a1359b763cd1c1d4bea314ca630cc062cdbdbc17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/430d14c01836b77c28092883d195a43ce413ee32", - "reference": "430d14c01836b77c28092883d195a43ce413ee32", + "url": "https://api.github.com/repos/scheb/2fa-email/zipball/a1359b763cd1c1d4bea314ca630cc062cdbdbc17", + "reference": "a1359b763cd1c1d4bea314ca630cc062cdbdbc17", "shasum": "" }, "require": { - "doctrine/annotations": "^1.0", + "scheb/2fa-bundle": "self.version" + }, + "type": "library", + "autoload": { + "psr-4": { + "Scheb\\TwoFactorBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Scheb", + "email": "me@christianscheb.de" + } + ], + "description": "Extends scheb/2fa-bundle with two-factor authentication via email", + "homepage": "https://github.com/scheb/2fa", + "keywords": [ + "2fa", + "Authentication", + "email", + "symfony", + "two-factor", + "two-step" + ], + "support": { + "source": "https://github.com/scheb/2fa-email/tree/v5.13.2" + }, + "time": "2022-01-03T10:21:24+00:00" + }, + { + "name": "scheb/2fa-google-authenticator", + "version": "v5.13.2", + "source": { + "type": "git", + "url": "https://github.com/scheb/2fa-google-authenticator.git", + "reference": "9477bfc47b5927fb165022dd75700aefdd45a8cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scheb/2fa-google-authenticator/zipball/9477bfc47b5927fb165022dd75700aefdd45a8cc", + "reference": "9477bfc47b5927fb165022dd75700aefdd45a8cc", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^2.2", + "scheb/2fa-bundle": "self.version", + "spomky-labs/otphp": "^9.1|^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Scheb\\TwoFactorBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Scheb", + "email": "me@christianscheb.de" + } + ], + "description": "Extends scheb/2fa-bundle with two-factor authentication using Google Authenticator", + "homepage": "https://github.com/scheb/2fa", + "keywords": [ + "2fa", + "Authentication", + "google-authenticator", + "symfony", + "two-factor", + "two-step" + ], + "support": { + "source": "https://github.com/scheb/2fa-google-authenticator/tree/v5.13.2" + }, + "time": "2022-01-03T10:21:24+00:00" + }, + { + "name": "scheb/2fa-qr-code", + "version": "v5.13.2", + "source": { + "type": "git", + "url": "https://github.com/scheb/2fa-qr-code.git", + "reference": "1b30d3f32c443c20ddbd4830c7b41dfd17e4dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scheb/2fa-qr-code/zipball/1b30d3f32c443c20ddbd4830c7b41dfd17e4dcaf", + "reference": "1b30d3f32c443c20ddbd4830c7b41dfd17e4dcaf", + "shasum": "" + }, + "require": { + "endroid/qr-code": "^3.0", + "scheb/2fa-bundle": "self.version" + }, + "type": "library", + "autoload": { + "psr-4": { + "Scheb\\TwoFactorBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Scheb", + "email": "me@christianscheb.de" + } + ], + "description": "Extends scheb/2fa-bundle with the ability to render QR-codes for Google Authenticator or TOTP", + "homepage": "https://github.com/scheb/2fa", + "keywords": [ + "2fa", + "Authentication", + "qr-code", + "symfony", + "two-factor", + "two-step" + ], + "support": { + "source": "https://github.com/scheb/2fa-qr-code/tree/v5.13.2" + }, + "time": "2022-01-03T10:21:24+00:00" + }, + { + "name": "scheb/2fa-trusted-device", + "version": "v5.13.2", + "source": { + "type": "git", + "url": "https://github.com/scheb/2fa-trusted-device.git", + "reference": "acf5a1526eb2111fb7a82b9b52eb34b1ddfdc526" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scheb/2fa-trusted-device/zipball/acf5a1526eb2111fb7a82b9b52eb34b1ddfdc526", + "reference": "acf5a1526eb2111fb7a82b9b52eb34b1ddfdc526", + "shasum": "" + }, + "require": { + "lcobucci/jwt": "^3.4|^4.0", + "scheb/2fa-bundle": "self.version" + }, + "type": "library", + "autoload": { + "psr-4": { + "Scheb\\TwoFactorBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Scheb", + "email": "me@christianscheb.de" + } + ], + "description": "Extends scheb/2fa-bundle with trusted devices support", + "homepage": "https://github.com/scheb/2fa", + "keywords": [ + "2fa", + "Authentication", + "symfony", + "trusted-device", + "two-factor", + "two-step" + ], + "support": { + "source": "https://github.com/scheb/2fa-trusted-device/tree/v5.13.2" + }, + "time": "2022-01-03T10:21:24+00:00" + }, + { + "name": "sensio/framework-extra-bundle", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "2f886f4b31f23c76496901acaedfedb6936ba61f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/2f886f4b31f23c76496901acaedfedb6936ba61f", + "reference": "2f886f4b31f23c76496901acaedfedb6936ba61f", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0|^2.0", "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/framework-bundle": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/framework-bundle": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0" }, "conflict": { "doctrine/doctrine-cache-bundle": "<1.3.1", @@ -8499,25 +8679,23 @@ "doctrine/dbal": "^2.10|^3.0", "doctrine/doctrine-bundle": "^1.11|^2.0", "doctrine/orm": "^2.5", - "nyholm/psr7": "^1.1", - "symfony/browser-kit": "^4.4|^5.0", - "symfony/doctrine-bridge": "^4.4|^5.0", - "symfony/dom-crawler": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/monolog-bridge": "^4.0|^5.0", + "symfony/browser-kit": "^4.4|^5.0|^6.0", + "symfony/doctrine-bridge": "^4.4|^5.0|^6.0", + "symfony/dom-crawler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/monolog-bridge": "^4.0|^5.0|^6.0", "symfony/monolog-bundle": "^3.2", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9", - "symfony/psr-http-message-bridge": "^1.1", - "symfony/security-bundle": "^4.4|^5.0", - "symfony/twig-bundle": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0", + "symfony/security-bundle": "^4.4|^5.0|^6.0", + "symfony/twig-bundle": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4|^5.0|^6.0", "twig/twig": "^1.34|^2.4|^3.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "5.6.x-dev" + "dev-master": "6.1.x-dev" } }, "autoload": { @@ -8544,29 +8722,29 @@ "controllers" ], "support": { - "issues": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues", - "source": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/tree/v5.6.1" + "source": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/tree/v6.2.10" }, - "time": "2020-08-25T19:10:18+00:00" + "abandoned": "Symfony", + "time": "2023-02-24T14:57:12+00:00" }, { "name": "sentry/sdk", - "version": "2.2.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php-sdk.git", - "reference": "089858b1b27d3705a5fd1c32d8d10beb55980190" + "reference": "cd91b752f07c4bab9fb3b173f81af68a78a78d6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/089858b1b27d3705a5fd1c32d8d10beb55980190", - "reference": "089858b1b27d3705a5fd1c32d8d10beb55980190", + "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/cd91b752f07c4bab9fb3b173f81af68a78a78d6d", + "reference": "cd91b752f07c4bab9fb3b173f81af68a78a78d6d", "shasum": "" }, "require": { "http-interop/http-factory-guzzle": "^1.0", - "sentry/sentry": "^2.5", - "symfony/http-client": "^4.3|^5.0" + "sentry/sentry": "^3.19", + "symfony/http-client": "^4.3|^5.0|^6.0" }, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", @@ -8591,7 +8769,8 @@ "sentry" ], "support": { - "source": "https://github.com/getsentry/sentry-php-sdk/tree/2.2.0" + "issues": "https://github.com/getsentry/sentry-php-sdk/issues", + "source": "https://github.com/getsentry/sentry-php-sdk/tree/3.5.0" }, "funding": [ { @@ -8603,64 +8782,63 @@ "type": "custom" } ], - "time": "2020-09-14T09:30:55+00:00" + "time": "2023-06-12T17:50:36+00:00" }, { "name": "sentry/sentry", - "version": "2.5.2", + "version": "3.21.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "ce63f13e2cf9f72ec169413545a3f7312b2e45e3" + "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/ce63f13e2cf9f72ec169413545a3f7312b2e45e3", - "reference": "ce63f13e2cf9f72ec169413545a3f7312b2e45e3", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/624aafc22b84b089ffa43b71fb01e0096505ec4f", + "reference": "624aafc22b84b089ffa43b71fb01e0096505ec4f", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "guzzlehttp/promises": "^1.3", - "guzzlehttp/psr7": "^1.7", - "jean85/pretty-package-versions": "^1.5|^2.0.1", - "php": "^7.1", + "guzzlehttp/promises": "^1.5.3|^2.0", + "jean85/pretty-package-versions": "^1.5|^2.0.4", + "php": "^7.2|^8.0", "php-http/async-client-implementation": "^1.0", "php-http/client-common": "^1.5|^2.0", - "php-http/discovery": "^1.6.1", + "php-http/discovery": "^1.15", "php-http/httplug": "^1.1|^2.0", "php-http/message": "^1.5", + "php-http/message-factory": "^1.1", "psr/http-factory": "^1.0", - "psr/http-message-implementation": "^1.0", - "psr/log": "^1.0", - "symfony/options-resolver": "^2.7|^3.0|^4.0|^5.0", - "symfony/polyfill-uuid": "^1.13.1" + "psr/http-factory-implementation": "^1.0", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0", + "symfony/polyfill-php80": "^1.17" }, "conflict": { "php-http/client-common": "1.8.0", "raven/raven": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "monolog/monolog": "^1.3|^2.0", - "php-http/mock-client": "^1.4", + "friendsofphp/php-cs-fixer": "^2.19|3.4.*", + "guzzlehttp/psr7": "^1.8.4|^2.1.1", + "http-interop/http-factory-guzzle": "^1.0", + "monolog/monolog": "^1.6|^2.0|^3.0", + "nikic/php-parser": "^4.10.3", + "php-http/mock-client": "^1.3", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20", - "symfony/phpunit-bridge": "^5.2", - "vimeo/psalm": "^4.2" + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5.14|^9.4", + "symfony/phpunit-bridge": "^5.2|^6.0", + "vimeo/psalm": "^4.17" }, "suggest": { "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler." }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5.x-dev" - } - }, "autoload": { "files": [ "src/functions.php" @@ -8671,7 +8849,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { @@ -8692,7 +8870,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/2.5.2" + "source": "https://github.com/getsentry/sentry-php/tree/3.21.0" }, "funding": [ { @@ -8704,71 +8882,90 @@ "type": "custom" } ], - "time": "2021-02-02T08:58:09+00:00" + "time": "2023-07-31T15:31:24+00:00" }, { "name": "sentry/sentry-symfony", - "version": "3.5.3", + "version": "4.10.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-symfony.git", - "reference": "839460734f50fc26a0276532ad9bf977c117bece" + "reference": "be9d93e5aed6a76a98dc980ae9e6fb56a29083b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-symfony/zipball/839460734f50fc26a0276532ad9bf977c117bece", - "reference": "839460734f50fc26a0276532ad9bf977c117bece", + "url": "https://api.github.com/repos/getsentry/sentry-symfony/zipball/be9d93e5aed6a76a98dc980ae9e6fb56a29083b1", + "reference": "be9d93e5aed6a76a98dc980ae9e6fb56a29083b1", "shasum": "" }, "require": { - "jean85/pretty-package-versions": "^1.5", - "php": "^7.1", - "sentry/sdk": "^2.1", - "symfony/config": "^3.4||^4.0||^5.0", - "symfony/console": "^3.4||^4.0||^5.0", - "symfony/dependency-injection": "^3.4||^4.0||^5.0", - "symfony/event-dispatcher": "^3.4||^4.0||^5.0", - "symfony/http-kernel": "^3.4||^4.0||^5.0", - "symfony/security-core": "^3.4||^4.0||^5.0" + "guzzlehttp/psr7": "^1.7 || ^2.0", + "jean85/pretty-package-versions": "^1.5 || ^2.0", + "php": "^7.2||^8.0", + "sentry/sdk": "^3.4", + "sentry/sentry": "^3.20.1", + "symfony/cache-contracts": "^1.1||^2.4||^3.0", + "symfony/config": "^4.4.20||^5.0.11||^6.0", + "symfony/console": "^4.4.20||^5.0.11||^6.0", + "symfony/dependency-injection": "^4.4.20||^5.0.11||^6.0", + "symfony/event-dispatcher": "^4.4.20||^5.0.11||^6.0", + "symfony/http-kernel": "^4.4.20||^5.0.11||^6.0", + "symfony/polyfill-php80": "^1.22", + "symfony/psr-http-message-bridge": "^1.2||^2.0", + "symfony/security-core": "^4.4.20||^5.0.11||^6.0", + "symfony/security-http": "^4.4.20||^5.0.11||^6.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.8", - "jangregor/phpstan-prophecy": "^0.6.2", - "monolog/monolog": "^1.11||^2.0", - "php-http/mock-client": "^1.0", + "doctrine/dbal": "^2.13||^3.0", + "doctrine/doctrine-bundle": "^1.12||^2.5", + "friendsofphp/php-cs-fixer": "^2.19||<=3.16.0", + "jangregor/phpstan-prophecy": "^1.0", + "monolog/monolog": "^1.3||^2.0", "phpspec/prophecy": "!=1.11.0", + "phpspec/prophecy-phpunit": "^1.1||^2.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.19", - "phpstan/phpstan-phpunit": "^0.12.8", - "phpunit/phpunit": "^7.5||^8.5", - "symfony/browser-kit": "^3.4||^4.0||^5.0", - "symfony/expression-language": "^3.4||^4.0||^5.0", - "symfony/framework-bundle": "^3.4||^4.0||^5.0", - "symfony/messenger": "^4.3||^5.0", + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-symfony": "^1.0", + "phpunit/phpunit": "^8.5.14||^9.3.9", + "symfony/browser-kit": "^4.4.20||^5.0.11||^6.0", + "symfony/cache": "^4.4.20||^5.0.11||^6.0", + "symfony/dom-crawler": "^4.4.20||^5.0.11||^6.0", + "symfony/framework-bundle": "^4.4.20||^5.0.11||^6.0", + "symfony/http-client": "^4.4.20||^5.0.11||^6.0", + "symfony/messenger": "^4.4.20||^5.0.11||^6.0", "symfony/monolog-bundle": "^3.4", - "symfony/phpunit-bridge": "^5.0", - "symfony/yaml": "^3.4||^4.0||^5.0" + "symfony/phpunit-bridge": "^5.2.6||^6.0", + "symfony/process": "^4.4.20||^5.0.11||^6.0", + "symfony/twig-bundle": "^4.4.20||^5.0.11||^6.0", + "symfony/yaml": "^4.4.20||^5.0.11||^6.0", + "vimeo/psalm": "^4.3" }, "suggest": { - "monolog/monolog": "Required to use the Monolog handler" + "doctrine/doctrine-bundle": "Allow distributed tracing of database queries using Sentry.", + "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler.", + "symfony/cache": "Allow distributed tracing of cache pools using Sentry.", + "symfony/twig-bundle": "Allow distributed tracing of Twig template rendering using Sentry." }, "type": "symfony-bundle", "extra": { "branch-alias": { - "master": "3.x-dev", "releases/3.2.x": "3.2.x-dev", "releases/2.x": "2.x-dev", "releases/1.x": "1.x-dev" } }, "autoload": { + "files": [ + "src/aliases.php" + ], "psr-4": { "Sentry\\SentryBundle\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { @@ -8790,7 +8987,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-symfony/issues", - "source": "https://github.com/getsentry/sentry-symfony/tree/3.5.3" + "source": "https://github.com/getsentry/sentry-symfony/tree/4.10.0" }, "funding": [ { @@ -8802,30 +8999,31 @@ "type": "custom" } ], - "time": "2020-10-13T07:37:17+00:00" + "time": "2023-08-01T13:42:19+00:00" }, { "name": "simplepie/simplepie", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/simplepie/simplepie.git", - "reference": "9e9add3428ce86aede874bcf9a59c78e272f8dc1" + "reference": "65b095d87bc00898d8fa7737bdbcda93a3fbcc55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplepie/simplepie/zipball/9e9add3428ce86aede874bcf9a59c78e272f8dc1", - "reference": "9e9add3428ce86aede874bcf9a59c78e272f8dc1", + "url": "https://api.github.com/repos/simplepie/simplepie/zipball/65b095d87bc00898d8fa7737bdbcda93a3fbcc55", + "reference": "65b095d87bc00898d8fa7737bdbcda93a3fbcc55", "shasum": "" }, "require": { "ext-pcre": "*", "ext-xml": "*", "ext-xmlreader": "*", - "php": ">=5.6.0" + "php": ">=7.2.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.19 || ^3.8", + "psr/simple-cache": "^1 || ^2 || ^3", "yoast/phpunit-polyfills": "^1.0.1" }, "suggest": { @@ -8875,9 +9073,9 @@ ], "support": { "issues": "https://github.com/simplepie/simplepie/issues", - "source": "https://github.com/simplepie/simplepie/tree/1.7.0" + "source": "https://github.com/simplepie/simplepie/tree/1.8.0" }, - "time": "2022-09-30T06:49:48+00:00" + "time": "2023-01-20T08:37:35+00:00" }, { "name": "smalot/pdfparser", @@ -9006,16 +9204,16 @@ }, { "name": "stof/doctrine-extensions-bundle", - "version": "v1.7.1", + "version": "v1.7.2", "source": { "type": "git", "url": "https://github.com/stof/StofDoctrineExtensionsBundle.git", - "reference": "fa650e60e174afa06c09e28a54fb1854af04c7fe" + "reference": "5cfabc774ee0df1904b10cd03ceb39d993bb61bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stof/StofDoctrineExtensionsBundle/zipball/fa650e60e174afa06c09e28a54fb1854af04c7fe", - "reference": "fa650e60e174afa06c09e28a54fb1854af04c7fe", + "url": "https://api.github.com/repos/stof/StofDoctrineExtensionsBundle/zipball/5cfabc774ee0df1904b10cd03ceb39d993bb61bd", + "reference": "5cfabc774ee0df1904b10cd03ceb39d993bb61bd", "shasum": "" }, "require": { @@ -9074,85 +9272,9 @@ ], "support": { "issues": "https://github.com/stof/StofDoctrineExtensionsBundle/issues", - "source": "https://github.com/stof/StofDoctrineExtensionsBundle/tree/v1.7.1" + "source": "https://github.com/stof/StofDoctrineExtensionsBundle/tree/v1.7.2" }, - "time": "2022-09-30T11:52:24+00:00" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", - "shasum": "" - }, - "require": { - "egulias/email-validator": "^2.0|^3.1", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.4" - }, - "suggest": { - "ext-intl": "Needed to support internationalized email addresses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "support": { - "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", - "type": "tidelift" - } - ], - "abandoned": "symfony/mailer", - "time": "2021-10-18T15:26:12+00:00" + "time": "2023-05-22T18:25:15+00:00" }, { "name": "symfony/contracts", @@ -9479,27 +9601,24 @@ "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-iconv", + "name": "symfony/polyfill-intl-grapheme", "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "927013f3aac555983a5059aada98e1907d842695" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695", - "reference": "927013f3aac555983a5059aada98e1907d842695", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { "php": ">=7.1" }, - "provide": { - "ext-iconv": "*" - }, "suggest": { - "ext-iconv": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { @@ -9516,7 +9635,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -9533,17 +9652,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Iconv extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "iconv", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -10220,126 +10340,46 @@ "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-uuid", - "version": "v1.27.0", + "name": "symfony/psr-http-message-bridge", + "version": "v2.1.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166" + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "a125b93ef378c492e274f217874906fb9babdebb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/f3cf1a645c2734236ed1e2e671e273eeb3586166", - "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-uuid": "*" - }, - "suggest": { - "ext-uuid": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Uuid\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Grégoire Pineau", - "email": "lyrixx@lyrixx.info" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for uuid functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "uuid" - ], - "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" - }, - { - "name": "symfony/swiftmailer-bundle", - "version": "v3.5.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/swiftmailer-bundle.git", - "reference": "9daab339f226ac958192bf89836cb3378cc0e652" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/9daab339f226ac958192bf89836cb3378cc0e652", - "reference": "9daab339f226ac958192bf89836cb3378cc0e652", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a125b93ef378c492e274f217874906fb9babdebb", + "reference": "a125b93ef378c492e274f217874906fb9babdebb", "shasum": "" }, "require": { "php": ">=7.1", - "swiftmailer/swiftmailer": "^6.1.3", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0" - }, - "conflict": { - "twig/twig": "<1.41|>=2.0,<2.10" + "psr/http-message": "^1.0", + "symfony/http-foundation": "^4.4 || ^5.0 || ^6.0" }, "require-dev": { - "symfony/console": "^4.4|^5.0", - "symfony/framework-bundle": "^4.4|^5.0", - "symfony/phpunit-bridge": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0" + "nyholm/psr7": "^1.1", + "psr/log": "^1.1 || ^2 || ^3", + "symfony/browser-kit": "^4.4 || ^5.0 || ^6.0", + "symfony/config": "^4.4 || ^5.0 || ^6.0", + "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", + "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", + "symfony/phpunit-bridge": "^5.4@dev || ^6.0" }, - "type": "symfony-bundle", + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "2.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Bundle\\SwiftmailerBundle\\": "" + "Symfony\\Bridge\\PsrHttpMessage\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -10359,11 +10399,17 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony SwiftmailerBundle", + "description": "PSR HTTP message bridge", "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], "support": { - "issues": "https://github.com/symfony/swiftmailer-bundle/issues", - "source": "https://github.com/symfony/swiftmailer-bundle/tree/v3.5.4" + "issues": "https://github.com/symfony/psr-http-message-bridge/issues", + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.4" }, "funding": [ { @@ -10379,21 +10425,106 @@ "type": "tidelift" } ], - "abandoned": "symfony/mailer", - "time": "2022-02-06T08:03:40+00:00" + "time": "2022-11-28T22:46:34+00:00" }, { - "name": "symfony/symfony", - "version": "v4.4.49", + "name": "symfony/string", + "version": "v5.4.26", "source": { "type": "git", - "url": "https://github.com/symfony/symfony.git", - "reference": "3da1b76795bb874619b46ced70fb33806936169e" + "url": "https://github.com/symfony/string.git", + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/3da1b76795bb874619b46ced70fb33806936169e", - "reference": "3da1b76795bb874619b46ced70fb33806936169e", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.26" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-06-28T12:46:07+00:00" + }, + { + "name": "symfony/symfony", + "version": "v4.4.50", + "source": { + "type": "git", + "url": "https://github.com/symfony/symfony.git", + "reference": "6bc1c2e2506327daa9a2359ec45f7098ca947728" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/symfony/zipball/6bc1c2e2506327daa9a2359ec45f7098ca947728", + "reference": "6bc1c2e2506327daa9a2359ec45f7098ca947728", "shasum": "" }, "require": { @@ -10571,7 +10702,7 @@ ], "support": { "issues": "https://github.com/symfony/symfony/issues", - "source": "https://github.com/symfony/symfony/tree/v4.4.49" + "source": "https://github.com/symfony/symfony/tree/v4.4.50" }, "funding": [ { @@ -10587,20 +10718,20 @@ "type": "tidelift" } ], - "time": "2022-11-28T17:58:55+00:00" + "time": "2023-02-01T08:01:44+00:00" }, { "name": "tecnickcom/tcpdf", - "version": "6.5.0", + "version": "6.6.2", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "cc54c1503685e618b23922f53635f46e87653662" + "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/cc54c1503685e618b23922f53635f46e87653662", - "reference": "cc54c1503685e618b23922f53635f46e87653662", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/e3cffc9bcbc76e89e167e9eb0bbda0cab7518459", + "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459", "shasum": "" }, "require": { @@ -10651,7 +10782,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.5.0" + "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.2" }, "funding": [ { @@ -10659,7 +10790,7 @@ "type": "custom" } ], - "time": "2022-08-12T07:50:54+00:00" + "time": "2022-12-17T10:28:59+00:00" }, { "name": "thecodingmachine/safe", @@ -10852,42 +10983,44 @@ "time": "2016-11-16T10:37:54+00:00" }, { - "name": "twig/extensions", - "version": "v1.5.4", + "name": "twig/extra-bundle", + "version": "v3.7.0", "source": { "type": "git", - "url": "https://github.com/twigphp/Twig-extensions.git", - "reference": "57873c8b0c1be51caa47df2cdb824490beb16202" + "url": "https://github.com/twigphp/twig-extra-bundle.git", + "reference": "802cc2dd46ec88285d6c7fa85c26ab7f2cd5bc49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/57873c8b0c1be51caa47df2cdb824490beb16202", - "reference": "57873c8b0c1be51caa47df2cdb824490beb16202", + "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/802cc2dd46ec88285d6c7fa85c26ab7f2cd5bc49", + "reference": "802cc2dd46ec88285d6c7fa85c26ab7f2cd5bc49", "shasum": "" }, "require": { - "twig/twig": "^1.27|^2.0" + "php": ">=7.2.5", + "symfony/framework-bundle": "^4.4|^5.0|^6.0", + "symfony/twig-bundle": "^4.4|^5.0|^6.0", + "twig/twig": "^2.7|^3.0" }, "require-dev": { - "symfony/phpunit-bridge": "^3.4", - "symfony/translation": "^2.7|^3.4" - }, - "suggest": { - "symfony/translation": "Allow the time_diff output to be translated" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } + "league/commonmark": "^1.0|^2.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0", + "twig/cache-extra": "^3.0", + "twig/cssinliner-extra": "^2.12|^3.0", + "twig/html-extra": "^2.12|^3.0", + "twig/inky-extra": "^2.12|^3.0", + "twig/intl-extra": "^2.12|^3.0", + "twig/markdown-extra": "^2.12|^3.0", + "twig/string-extra": "^2.12|^3.0" }, + "type": "symfony-bundle", "autoload": { - "psr-0": { - "Twig_Extensions_": "lib/" - }, "psr-4": { - "Twig\\Extensions\\": "src/" - } + "Twig\\Extra\\TwigExtraBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -10896,55 +11029,125 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" } ], - "description": "Common additional features for Twig that do not directly belong in core", + "description": "A Symfony bundle for extra Twig extensions", + "homepage": "https://twig.symfony.com", "keywords": [ - "i18n", - "text" + "bundle", + "extra", + "twig" ], "support": { - "issues": "https://github.com/twigphp/Twig-extensions/issues", - "source": "https://github.com/twigphp/Twig-extensions/tree/master" + "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.7.0" }, - "abandoned": true, - "time": "2018-12-05T18:34:18+00:00" + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2023-05-06T11:11:46+00:00" }, { - "name": "twig/twig", - "version": "v2.15.3", + "name": "twig/string-extra", + "version": "v3.7.0", "source": { "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "ab402673db8746cb3a4c46f3869d6253699f614a" + "url": "https://github.com/twigphp/string-extra.git", + "reference": "fab682645b3f8730fbdb7bf9ec8fe668d6f76638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ab402673db8746cb3a4c46f3869d6253699f614a", - "reference": "ab402673db8746cb3a4c46f3869d6253699f614a", + "url": "https://api.github.com/repos/twigphp/string-extra/zipball/fab682645b3f8730fbdb7bf9ec8fe668d6f76638", + "reference": "fab682645b3f8730fbdb7bf9ec8fe668d6f76638", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.8" + "php": ">=7.2.5", + "symfony/string": "^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2|^3", + "twig/twig": "^2.7|^3.0" }, "require-dev": { - "psr/container": "^1.0", "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.15-dev" - } - }, "autoload": { - "psr-0": { - "Twig_": "lib/" + "psr-4": { + "Twig\\Extra\\String\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + } + ], + "description": "A Twig extension for Symfony String", + "homepage": "https://twig.symfony.com", + "keywords": [ + "html", + "string", + "twig", + "unicode" + ], + "support": { + "source": "https://github.com/twigphp/string-extra/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2023-02-09T06:45:16+00:00" + }, + { + "name": "twig/twig", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "5cf942bbab3df42afa918caeba947f1b690af64b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/5cf942bbab3df42afa918caeba947f1b690af64b", + "reference": "5cf942bbab3df42afa918caeba947f1b690af64b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "autoload": { "psr-4": { "Twig\\": "src/" } @@ -10977,7 +11180,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v2.15.3" + "source": "https://github.com/twigphp/Twig/tree/v3.7.0" }, "funding": [ { @@ -10989,7 +11192,7 @@ "type": "tidelift" } ], - "time": "2022-09-28T08:40:08+00:00" + "time": "2023-07-26T07:16:09+00:00" }, { "name": "wallabag/php-mobi", @@ -11169,30 +11372,31 @@ }, { "name": "willdurand/hateoas", - "version": "3.8.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/willdurand/Hateoas.git", - "reference": "2f37b8823328a9ee170f2af7880ce02f9fabe019" + "reference": "39bae0385895b2615d6f7bea5cae0657349582fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/willdurand/Hateoas/zipball/2f37b8823328a9ee170f2af7880ce02f9fabe019", - "reference": "2f37b8823328a9ee170f2af7880ce02f9fabe019", + "url": "https://api.github.com/repos/willdurand/Hateoas/zipball/39bae0385895b2615d6f7bea5cae0657349582fc", + "reference": "39bae0385895b2615d6f7bea5cae0657349582fc", "shasum": "" }, "require": { - "doctrine/annotations": "^1.13.2", + "doctrine/annotations": "^1.13.2 || ^2.0", "jms/metadata": "^2.0", - "jms/serializer": "^3.2", + "jms/serializer": "^3.18.2", "php": "^7.2 | ^8.0", "symfony/expression-language": "~3.0 || ~4.0 || ~5.0 || ~6.0" }, "require-dev": { "doctrine/coding-standard": "^5.0 | ^8.0", - "doctrine/persistence": "^1.3.4", + "doctrine/persistence": "^1.3.4 | ^2.0 | ^3.0", "pagerfanta/core": "^2.4 || ^3.0", "phpdocumentor/type-resolver": "^1.5.1", + "phpspec/prophecy": "^1.16", "phpspec/prophecy-phpunit": "^2.0.1", "phpunit/phpunit": "^7 | ^9.5.10", "symfony/routing": "~3.0 || ~4.0 || ~5.0 || ~6.0", @@ -11236,9 +11440,9 @@ "description": "A PHP library to support implementing representations for HATEOAS REST web services", "support": { "issues": "https://github.com/willdurand/Hateoas/issues", - "source": "https://github.com/willdurand/Hateoas/tree/3.8.0" + "source": "https://github.com/willdurand/Hateoas/tree/3.9.0" }, - "time": "2021-12-18T21:29:42+00:00" + "time": "2023-01-31T13:54:41+00:00" }, { "name": "willdurand/hateoas-bundle", @@ -11402,37 +11606,46 @@ }, { "name": "zircote/swagger-php", - "version": "2.1.2", + "version": "4.7.10", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "f144351118e6bcc04a275f490d7e359a3dd62586" + "reference": "6d2f0fcc46bf9043877de8656a9ea95331155522" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/f144351118e6bcc04a275f490d7e359a3dd62586", - "reference": "f144351118e6bcc04a275f490d7e359a3dd62586", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/6d2f0fcc46bf9043877de8656a9ea95331155522", + "reference": "6d2f0fcc46bf9043877de8656a9ea95331155522", "shasum": "" }, "require": { - "doctrine/annotations": "^1.7", + "doctrine/annotations": "^1.7 || ^2.0", + "ext-json": "*", "php": ">=7.2", - "symfony/finder": ">=3.4" + "psr/log": "^1.1 || ^2.0 || ^3.0", + "symfony/deprecation-contracts": "^2 || ^3", + "symfony/finder": ">=2.2", + "symfony/yaml": ">=3.3" }, "require-dev": { - "phpunit/phpunit": "^8 || ^9", - "squizlabs/php_codesniffer": ">=2.7" + "composer/package-versions-deprecated": "^1.11", + "friendsofphp/php-cs-fixer": "^2.17 || ^3.0", + "phpstan/phpstan": "^1.6", + "phpunit/phpunit": ">=8", + "vimeo/psalm": "^4.23" }, "bin": [ - "bin/swagger" + "bin/openapi" ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Swagger\\": "src" + "OpenApi\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -11442,16 +11655,20 @@ "authors": [ { "name": "Robert Allen", - "email": "zircote@gmail.com", - "homepage": "http://www.zircote.com" + "email": "zircote@gmail.com" }, { "name": "Bob Fanger", "email": "bfanger@gmail.com", - "homepage": "http://bfanger.nl" + "homepage": "https://bfanger.nl" + }, + { + "name": "Martin Rademacher", + "email": "mano@radebatz.net", + "homepage": "https://radebatz.net" } ], - "description": "Swagger-PHP - Generate interactive documentation for your RESTful API using phpdoc annotations", + "description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations", "homepage": "https://github.com/zircote/swagger-php/", "keywords": [ "api", @@ -11461,9 +11678,9 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/2.1.2" + "source": "https://github.com/zircote/swagger-php/tree/4.7.10" }, - "time": "2022-06-18T00:00:23+00:00" + "time": "2023-04-28T00:56:39+00:00" } ], "packages-dev": [ @@ -11687,40 +11904,40 @@ }, { "name": "dama/doctrine-test-bundle", - "version": "v6.7.5", + "version": "v7.1.1", "source": { "type": "git", "url": "https://github.com/dmaicher/doctrine-test-bundle.git", - "reference": "af6f8e8c56fcfdf2ae039b97607883961a14af9c" + "reference": "279a554556bed387a6aaae0c13cc982d4874773b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/af6f8e8c56fcfdf2ae039b97607883961a14af9c", - "reference": "af6f8e8c56fcfdf2ae039b97607883961a14af9c", + "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/279a554556bed387a6aaae0c13cc982d4874773b", + "reference": "279a554556bed387a6aaae0c13cc982d4874773b", "shasum": "" }, "require": { - "doctrine/dbal": "^2.9.3 || ^3.0", - "doctrine/doctrine-bundle": "^1.11 || ^2.0", + "doctrine/dbal": "^3.3", + "doctrine/doctrine-bundle": "^2.2.2", "ext-json": "*", - "php": "^7.1 || ^8.0", + "php": "^7.3 || ^8.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.3 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0" + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0" }, "require-dev": { "behat/behat": "^3.0", "doctrine/cache": "^1.12", "phpstan/phpstan": "^1.2", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "symfony/phpunit-bridge": "^5.3 || ^6.0", - "symfony/process": "^4.4 || ^5.3 || ^6.0", - "symfony/yaml": "^4.4 || ^5.3 || ^6.0" + "phpunit/phpunit": "^8.0 || ^9.0", + "symfony/phpunit-bridge": "^6.0", + "symfony/process": "^4.4 || ^5.4 || ^6.0", + "symfony/yaml": "^4.4 || ^5.4 || ^6.0" }, "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -11748,44 +11965,44 @@ ], "support": { "issues": "https://github.com/dmaicher/doctrine-test-bundle/issues", - "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v6.7.5" + "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v7.1.1" }, - "time": "2022-02-08T16:00:51+00:00" + "time": "2022-07-01T12:06:31+00:00" }, { "name": "doctrine/data-fixtures", - "version": "1.5.3", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/doctrine/data-fixtures.git", - "reference": "ba37bfb776de763c5bf04a36d074cd5f5a083c42" + "reference": "4af35dadbfcf4b00abb2a217c4c8c8800cf5fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/ba37bfb776de763c5bf04a36d074cd5f5a083c42", - "reference": "ba37bfb776de763c5bf04a36d074cd5f5a083c42", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/4af35dadbfcf4b00abb2a217c4c8c8800cf5fcf4", + "reference": "4af35dadbfcf4b00abb2a217c4c8c8800cf5fcf4", "shasum": "" }, "require": { - "doctrine/common": "^2.13|^3.0", - "doctrine/persistence": "^1.3.3|^2.0|^3.0", + "doctrine/deprecations": "^0.5.3 || ^1.0", + "doctrine/persistence": "^1.3.3 || ^2.0 || ^3.0", "php": "^7.2 || ^8.0" }, "conflict": { "doctrine/dbal": "<2.13", + "doctrine/orm": "<2.12", "doctrine/phpcr-odm": "<1.3.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^11.0", "doctrine/dbal": "^2.13 || ^3.0", "doctrine/mongodb-odm": "^1.3.0 || ^2.0.0", - "doctrine/orm": "^2.7.0", + "doctrine/orm": "^2.12", "ext-sqlite3": "*", - "jangregor/phpstan-prophecy": "^1", "phpstan/phpstan": "^1.5", - "phpunit/phpunit": "^8.5 || ^9.5", + "phpunit/phpunit": "^8.5 || ^9.5 || ^10.0", "symfony/cache": "^5.0 || ^6.0", - "vimeo/psalm": "^4.10" + "vimeo/psalm": "^4.10 || ^5.9" }, "suggest": { "alcaeus/mongo-php-adapter": "For using MongoDB ODM 1.3 with PHP 7 (deprecated)", @@ -11796,7 +12013,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\DataFixtures\\": "lib/Doctrine/Common/DataFixtures" + "Doctrine\\Common\\DataFixtures\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -11816,7 +12033,7 @@ ], "support": { "issues": "https://github.com/doctrine/data-fixtures/issues", - "source": "https://github.com/doctrine/data-fixtures/tree/1.5.3" + "source": "https://github.com/doctrine/data-fixtures/tree/1.6.6" }, "funding": [ { @@ -11832,20 +12049,20 @@ "type": "tidelift" } ], - "time": "2022-04-19T10:01:44+00:00" + "time": "2023-04-20T13:08:54+00:00" }, { "name": "doctrine/doctrine-fixtures-bundle", - "version": "3.4.2", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineFixturesBundle.git", - "reference": "601988c5b46dbd20a0f886f967210aba378a6fd5" + "reference": "9ec3139c52a42e94c9fd1e95f8d2bca94326edfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/601988c5b46dbd20a0f886f967210aba378a6fd5", - "reference": "601988c5b46dbd20a0f886f967210aba378a6fd5", + "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/9ec3139c52a42e94c9fd1e95f8d2bca94326edfb", + "reference": "9ec3139c52a42e94c9fd1e95f8d2bca94326edfb", "shasum": "" }, "require": { @@ -11899,7 +12116,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues", - "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.2" + "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.4" }, "funding": [ { @@ -11915,89 +12132,337 @@ "type": "tidelift" } ], - "time": "2022-04-28T17:58:29+00:00" + "time": "2023-05-02T15:12:16+00:00" }, { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", + "name": "ergebnis/composer-normalize", + "version": "2.28.3", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "ec75a2bf751f6fec165e9ea0262655b8ca397e5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/ec75a2bf751f6fec165e9ea0262655b8ca397e5c", + "reference": "ec75a2bf751f6fec165e9ea0262655b8ca397e5c", "shasum": "" }, "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + "composer-plugin-api": "^2.0.0", + "ergebnis/json-normalizer": "~2.1.0", + "ergebnis/json-printer": "^3.2.0", + "justinrainbow/json-schema": "^5.2.12", + "localheinz/diff": "^1.1.1", + "php": "^7.4 || ^8.0" }, "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", + "composer/composer": "^2.3.9", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^4.4.0", + "fakerphp/faker": "^1.19.0", + "phpunit/phpunit": "^9.5.21", + "psalm/plugin-phpunit": "~0.17.0", + "symfony/filesystem": "^5.4.9", + "vimeo/psalm": "^4.24.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "time": "2022-07-05T16:09:10+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "2039eb11131a243b9204bf51219baa08935e6b1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/2039eb11131a243b9204bf51219baa08935e6b1d", + "reference": "2039eb11131a243b9204bf51219baa08935e6b1d", + "shasum": "" + }, + "require": { + "ergebnis/json-printer": "^3.2.0", + "ergebnis/json-schema-validator": "^2.0.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.11", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/data-provider": "^1.0.0", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.5", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.17.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2022-01-04T11:19:55+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "651cab2b7604a6b338d0d16749f5ea0851a68005" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/651cab2b7604a6b338d0d16749f5ea0851a68005", + "reference": "651cab2b7604a6b338d0d16749f5ea0851a68005", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "^3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.5", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.16.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "source": "https://github.com/ergebnis/json-printer" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-12-27T12:39:13+00:00" + }, + { + "name": "ergebnis/json-schema-validator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/dacd8a47c1cc2c426ec71e952da3609ebe901fac", + "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.10", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.18.0", + "ergebnis/data-provider": "^1.0.0", + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "~3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.3", + "phpunit/phpunit": "~9.5.10", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.15.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\SchemaValidator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], + "support": { + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "source": "https://github.com/ergebnis/json-schema-validator" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-12-13T16:54:56+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "shasum": "" + }, + "require": { + "composer/semver": "^3.2", + "composer/xdebug-handler": "^2.0", + "doctrine/annotations": "^1.12", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.2.5 || ^8.0", + "php-cs-fixer/diff": "^2.0", + "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", + "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", + "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.23", + "symfony/polyfill-php81": "^1.23", + "symfony/process": "^4.4.20 || ^5.0 || ^6.0", + "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^1.5", + "mikey179/vfsstream": "^1.6.8", + "php-coveralls/php-coveralls": "^2.5.2", + "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunit/phpunit": "^8.5.21 || ^9.5", "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "symfony/phpunit-bridge": "^5.2.4 || ^6.0", + "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -12016,7 +12481,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" }, "funding": [ { @@ -12024,30 +12489,36 @@ "type": "github" } ], - "time": "2021-11-15T17:17:55+00:00" + "time": "2021-12-11T16:25:08+00:00" }, { "name": "friendsoftwig/twigcs", - "version": "v6.0.0", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/friendsoftwig/twigcs.git", - "reference": "035af79b0fabbab1fc6b8e5698ead1f80e25c4ec" + "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/035af79b0fabbab1fc6b8e5698ead1f80e25c4ec", - "reference": "035af79b0fabbab1fc6b8e5698ead1f80e25c4ec", + "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/3c36d606c4f19db0dd2a01b735ec7a8151b7f182", + "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", + "ext-ctype": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", "symfony/console": "^4.4 || ^5.3 || ^6.0", "symfony/filesystem": "^4.4 || ^5.3 || ^6.0", "symfony/finder": "^4.4 || ^5.3 || ^6.0" }, "require-dev": { - "phpunit/phpunit": "^8.0 || ^9.0" + "phpunit/phpunit": "^9.5.20", + "symfony/phpunit-bridge": "^6.2.3" }, "bin": [ "bin/twigcs" @@ -12071,22 +12542,152 @@ "description": "Checkstyle automation for Twig", "support": { "issues": "https://github.com/friendsoftwig/twigcs/issues", - "source": "https://github.com/friendsoftwig/twigcs/tree/v6.0.0" + "source": "https://github.com/friendsoftwig/twigcs/tree/v6.1.0" }, - "time": "2021-12-15T11:20:27+00:00" + "time": "2023-01-04T16:01:24+00:00" }, { - "name": "m6web/redis-mock", - "version": "v5.3.0", + "name": "justinrainbow/json-schema", + "version": "5.2.12", "source": { "type": "git", - "url": "https://github.com/BedrockStreaming/RedisMock.git", - "reference": "e126231c0130ff2e83d53dbc0c305a8eed20372e" + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/BedrockStreaming/RedisMock/zipball/e126231c0130ff2e83d53dbc0c305a8eed20372e", - "reference": "e126231c0130ff2e83d53dbc0c305a8eed20372e", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + }, + "time": "2022-04-13T08:02:27+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "source": "https://github.com/localheinz/diff/tree/main" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-07-06T04:49:32+00:00" + }, + { + "name": "m6web/redis-mock", + "version": "v5.6.0", + "source": { + "type": "git", + "url": "https://github.com/BedrockStreaming/RedisMock.git", + "reference": "fdef627f640c63e95d804c11ac44d90d0baf2f99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/BedrockStreaming/RedisMock/zipball/fdef627f640c63e95d804c11ac44d90d0baf2f99", + "reference": "fdef627f640c63e95d804c11ac44d90d0baf2f99", "shasum": "" }, "require": { @@ -12120,22 +12721,22 @@ ], "support": { "issues": "https://github.com/BedrockStreaming/RedisMock/issues", - "source": "https://github.com/BedrockStreaming/RedisMock/tree/v5.3.0" + "source": "https://github.com/BedrockStreaming/RedisMock/tree/v5.6.0" }, - "time": "2022-06-14T17:39:03+00:00" + "time": "2023-05-02T19:20:41+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.2", + "version": "v4.15.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", - "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", "shasum": "" }, "require": { @@ -12176,22 +12777,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" }, - "time": "2022-11-12T15:38:23+00:00" + "time": "2023-05-19T20:20:00+00:00" }, { "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "version": "v2.0.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", "shasum": "" }, "require": { @@ -12219,46 +12820,42 @@ { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" } ], - "description": "sebastian/diff v2 backport support for PHP5.6", + "description": "sebastian/diff v3 backport support for PHP 5.6+", "homepage": "https://github.com/PHP-CS-Fixer", "keywords": [ "diff" ], "support": { "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" }, "abandoned": true, - "time": "2020-10-14T08:39:05+00:00" + "time": "2020-10-14T08:32:19+00:00" }, { "name": "php-http/mock-client", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/php-http/mock-client.git", - "reference": "a797c2a9122cccafcce14773b8a24d2808a9ab44" + "reference": "ae5d717334ecd68199667bea6e9db07276e69a2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/mock-client/zipball/a797c2a9122cccafcce14773b8a24d2808a9ab44", - "reference": "a797c2a9122cccafcce14773b8a24d2808a9ab44", + "url": "https://api.github.com/repos/php-http/mock-client/zipball/ae5d717334ecd68199667bea6e9db07276e69a2b", + "reference": "ae5d717334ecd68199667bea6e9db07276e69a2b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", "php-http/client-common": "^2.0", - "php-http/discovery": "^1.0", + "php-http/discovery": "^1.16", "php-http/httplug": "^2.0", - "php-http/message-factory": "^1.0", "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", + "psr/http-factory-implementation": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "symfony/polyfill-php80": "^1.17" }, "provide": { @@ -12267,14 +12864,9 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "phpspec/phpspec": "^5.1 || ^6.0" + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { "Http\\Mock\\": "src/" @@ -12300,28 +12892,28 @@ ], "support": { "issues": "https://github.com/php-http/mock-client/issues", - "source": "https://github.com/php-http/mock-client/tree/1.5.0" + "source": "https://github.com/php-http/mock-client/tree/1.6.0" }, - "time": "2021-08-25T07:01:14+00:00" + "time": "2023-05-21T08:31:38+00:00" }, { "name": "phpstan/extension-installer", - "version": "1.2.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f06dbb052ddc394e7896fcd1cfcd533f9f6ace40" + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f06dbb052ddc394e7896fcd1cfcd533f9f6ace40", - "reference": "f06dbb052ddc394e7896fcd1cfcd533f9f6ace40", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", "shasum": "" }, "require": { "composer-plugin-api": "^2.0", "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.8.0" + "phpstan/phpstan": "^1.9.0" }, "require-dev": { "composer/composer": "^2.0", @@ -12344,22 +12936,22 @@ "description": "Composer plugin for automatic installation of PHPStan extensions", "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.2.0" + "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" }, - "time": "2022-10-17T12:59:16+00:00" + "time": "2023-05-24T08:59:17+00:00" }, { "name": "phpstan/phpstan", - "version": "1.9.2", + "version": "1.10.26", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa" + "reference": "5d660cbb7e1b89253a47147ae44044f49832351f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa", - "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5d660cbb7e1b89253a47147ae44044f49832351f", + "reference": "5d660cbb7e1b89253a47147ae44044f49832351f", "shasum": "" }, "require": { @@ -12388,8 +12980,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.2" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -12405,25 +13000,25 @@ "type": "tidelift" } ], - "time": "2022-11-10T09:56:11+00:00" + "time": "2023-07-19T12:44:37+00:00" }, { "name": "phpstan/phpstan-doctrine", - "version": "1.3.23", + "version": "1.3.40", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-doctrine.git", - "reference": "964caf844c89134e5c2f19e97cbf8b5d12193779" + "reference": "f741919a720af6f84249abc62befeb15eee7bc88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/964caf844c89134e5c2f19e97cbf8b5d12193779", - "reference": "964caf844c89134e5c2f19e97cbf8b5d12193779", + "url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/f741919a720af6f84249abc62befeb15eee7bc88", + "reference": "f741919a720af6f84249abc62befeb15eee7bc88", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.8.11" + "phpstan/phpstan": "^1.10.12" }, "conflict": { "doctrine/collections": "<1.0", @@ -12433,6 +13028,7 @@ "doctrine/persistence": "<1.3" }, "require-dev": { + "composer/semver": "^3.3.2", "doctrine/annotations": "^1.11.0", "doctrine/collections": "^1.6", "doctrine/common": "^2.7 || ^3.0", @@ -12472,27 +13068,27 @@ "description": "Doctrine extensions for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-doctrine/issues", - "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.23" + "source": "https://github.com/phpstan/phpstan-doctrine/tree/1.3.40" }, - "time": "2022-11-14T07:46:16+00:00" + "time": "2023-05-11T11:26:04+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.2.2", + "version": "1.3.13", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "dea1f87344c6964c607d9076dee42d891f3923f0" + "reference": "d8bdab0218c5eb0964338d24a8511b65e9c94fa5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/dea1f87344c6964c607d9076dee42d891f3923f0", - "reference": "dea1f87344c6964c607d9076dee42d891f3923f0", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d8bdab0218c5eb0964338d24a8511b65e9c94fa5", + "reference": "d8bdab0218c5eb0964338d24a8511b65e9c94fa5", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.8.11" + "phpstan/phpstan": "^1.10" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -12524,28 +13120,28 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.2.2" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.13" }, - "time": "2022-10-28T10:23:07+00:00" + "time": "2023-05-26T11:05:59+00:00" }, { "name": "phpstan/phpstan-symfony", - "version": "1.2.16", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "d6ea16206b1b645ded5b43736d8ef5ae1168eb55" + "reference": "7332b90dfc291ac5b4b83fbca2081936faa1e3f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/d6ea16206b1b645ded5b43736d8ef5ae1168eb55", - "reference": "d6ea16206b1b645ded5b43736d8ef5ae1168eb55", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/7332b90dfc291ac5b4b83fbca2081936faa1e3f9", + "reference": "7332b90dfc291ac5b4b83fbca2081936faa1e3f9", "shasum": "" }, "require": { "ext-simplexml": "*", "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.1" + "phpstan/phpstan": "^1.9.18" }, "conflict": { "symfony/framework-bundle": "<3.0" @@ -12555,7 +13151,7 @@ "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", + "phpunit/phpunit": "^8.5.29 || ^9.5", "psr/container": "1.0 || 1.1.1", "symfony/config": "^5.4 || ^6.1", "symfony/console": "^5.4 || ^6.1", @@ -12595,9 +13191,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.16" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.2" }, - "time": "2022-11-04T13:16:15+00:00" + "time": "2023-05-16T12:46:15+00:00" }, { "name": "symfony/maker-bundle", @@ -12689,16 +13285,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v6.2.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "1bd3b17db6d2ec284efbdc916600e880d6d858df" + "reference": "e020e1efbd1b42cb670fcd7d19a25abbddba035d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/1bd3b17db6d2ec284efbdc916600e880d6d858df", - "reference": "1bd3b17db6d2ec284efbdc916600e880d6d858df", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/e020e1efbd1b42cb670fcd7d19a25abbddba035d", + "reference": "e020e1efbd1b42cb670fcd7d19a25abbddba035d", "shasum": "" }, "require": { @@ -12708,11 +13304,9 @@ "phpunit/phpunit": "<7.5|9.1.2" }, "require-dev": { - "symfony/deprecation-contracts": "^2.1|^3.0", - "symfony/error-handler": "^5.4|^6.0" - }, - "suggest": { - "symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/polyfill-php81": "^1.27" }, "bin": [ "bin/simple-phpunit" @@ -12752,7 +13346,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v6.2.0" + "source": "https://github.com/symfony/phpunit-bridge/tree/v6.3.2" }, "funding": [ { @@ -12768,80 +13362,14 @@ "type": "tidelift" } ], - "time": "2022-11-18T19:08:09+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2023-07-12T16:00:22+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "friendsofsymfony/oauth-server-bundle": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index c22237266..fc8be15c0 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4-fpm AS rootless +FROM php:8.1-fpm AS rootless ARG DEBIAN_FRONTEND=noninteractive ARG NODE_VERSION=16 @@ -33,7 +33,8 @@ RUN apt-get update && apt-get install -y \ zlib1g-dev \ git \ build-essential \ - nodejs + nodejs \ + npm RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp RUN docker-php-ext-install -j "$(nproc)" \ bcmath \ @@ -53,7 +54,7 @@ RUN docker-php-ext-install -j "$(nproc)" \ RUN pecl install redis; \ pecl install imagick; \ - pecl install xdebug; \ + pecl install xdebug-3.1.6; \ docker-php-ext-enable \ redis \ imagick \ diff --git a/docker/php/config/parameters.yml b/docker/php/config/parameters.yml index 4ffab2015..3bf5a6295 100644 --- a/docker/php/config/parameters.yml +++ b/docker/php/config/parameters.yml @@ -6,29 +6,22 @@ parameters: database_name: ${DATABASE_NAME:-symfony} database_user: ${DATABASE_USER:-root} database_password: ${DATABASE_PASSWORD:-~} - database_path: ${DATABASE_PATH:-"%kernel.root_dir%/data/db/wallabag.sqlite"} - database_table_prefix: wallabag_ + database_path: '${DATABASE_PATH:-"%kernel.root_dir%/data/db/wallabag.sqlite"}' + database_table_prefix: ${DATABASE_TABLE_PREFIX:-wallabag_} database_socket: null database_charset: ${DATABASE_CHARSET:-utf8} domain_name: ${DOMAIN_NAME:-https://www.example.com} server_name: ${SERVER_NAME:-"Your wallabag instance"} - mailer_transport: ${MAILER_TRANSPORT:-smtp} - mailer_user: ${MAILER_USER:-~} - mailer_password: ${MAILER_PASSWORD:-~} - mailer_host: ${MAILER_HOST:-127.0.0.1} - mailer_port: ${MAILER_PORT:-25} - mailer_encryption: ${MAILER_ENCRYPTION:-~} - mailer_auth_mode: ${MAILER_AUTH_MODE:-~} + mailer_dsn: ${MAILER_DSN:-"smtp://127.0.0.1"} - locale: ${LOCALE:-en} + locale: ${LOCALE:-en} # A secret key that's used to generate certain security-related tokens secret: ${SECRET:-~} # two factor stuff - twofactor_auth: ${TWOFACTOR_AUTH:-true} twofactor_sender: ${TWOFACTOR_SENDER:-no-reply@wallabag.org} # fosuser stuff diff --git a/package.json b/package.json index 76f75f9fd..406e031ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wallabag", - "version": "2.5.0", + "version": "2.6.0", "description": "wallabag is a self hostable application for saving web pages", "private": true, "directories": { @@ -17,17 +17,22 @@ { "name": "Nicolas Lœuillet", "email": "nicolas@loeuillet.org", - "homepage": "http://www.cdetc.fr", + "homepage": "https://nicolas.loeuillet.org", "role": "Developer" }, { "name": "Thomas Citharel", - "homepage": "http://tcit.fr", + "homepage": "https://tcit.fr", "role": "Developer" }, { "name": "Jérémy Benoist", - "homepage": "http://www.j0k3r.net", + "homepage": "https://www.j0k3r.net", + "role": "Developer" + }, + { + "name": "Kevin Decherf", + "homepage": "https://kdecherf.com/", "role": "Developer" } ], @@ -36,49 +41,50 @@ "url": "https://github.com/wallabag/wallabag/issues" }, "devDependencies": { - "@babel/core": "^7.20.2", - "@babel/eslint-parser": "^7.19.1", - "@babel/preset-env": "^7.20.2", - "autoprefixer": "^10.4.13", - "babel-loader": "^9.1.0", - "css-loader": "^6.7.2", - "eslint": "^8.28.0", + "@babel/core": "^7.22.9", + "@babel/eslint-parser": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "autoprefixer": "^10.4.14", + "babel-loader": "^9.1.3", + "css-loader": "^6.8.1", + "eslint": "^8.46.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-plugin-import": "^2.26.0", - "eslint-webpack-plugin": "^3.2.0", + "eslint-plugin-import": "^2.28.0", + "eslint-webpack-plugin": "^4.0.1", "file-loader": "^6.2.0", "lato-font": "^3.0.0", - "mini-css-extract-plugin": "^2.7.0", - "node-sass": "^8.0.0", - "postcss": "^8.4.19", - "postcss-loader": "^7.0.1", + "mini-css-extract-plugin": "^2.7.6", + "node-sass": "^9.0.0", + "postcss": "^8.4.27", + "postcss-loader": "^7.3.3", "postcss-scss": "^4.0.6", - "sass": "^1.56.1", - "sass-loader": "^13.2.0", - "style-loader": "^3.3.1", - "stylelint": "^14.15.0", - "stylelint-config-standard": "^29.0.0", - "stylelint-scss": "^4.3.0", - "stylelint-webpack-plugin": "^3.3.0", - "terser-webpack-plugin": "^5.3.6", + "sass": "^1.64.1", + "sass-loader": "^13.3.2", + "style-loader": "^3.3.3", + "stylelint": "^15.10.2", + "stylelint-config-standard": "^34.0.0", + "stylelint-config-standard-scss": "^10.0.0", + "stylelint-scss": "^5.0.1", + "stylelint-webpack-plugin": "^4.1.1", + "terser-webpack-plugin": "^5.3.9", "url-loader": "^4.1.1", - "webpack": "^5.75.0", - "webpack-cli": "^5.0.0", - "webpack-dev-server": "^4.11.1", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1", "webpack-manifest-plugin": "^5.0.0", - "webpack-merge": "^5.7.3" + "webpack-merge": "^5.9.0" }, "dependencies": { "annotator": "wallabag/annotator#master", "clipboard": "^2.0.11", "hammerjs": "^2.0.8", - "highlight.js": "^11.7.0", + "highlight.js": "^11.8.0", "icomoon-free-npm": "^0.0.0", - "jquery": "^3.6.1", + "jquery": "^3.7.0", "jquery.cookie": "^1.4.1", "jr-qrcode": "^1.0.7", "material-design-icons-iconfont": "^6.7.0", - "materialize-css": "^0.98.1", + "materialize-css": "^0.100.2", "mathjax": "^3.2.2", "mousetrap": "^1.6.0", "ptsans-npm-webfont": "^0.0.4", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 10a4c15d4..a65463051 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,40 +1,10 @@ parameters: ignoreErrors: - - - message: "#^Call to an undefined method Psr\\\\Container\\\\ContainerInterface\\:\\:getParameter\\(\\)\\.$#" - count: 2 - path: src/Wallabag/ApiBundle/Controller/EntryRestController.php - - - - message: "#^Call to an undefined method Psr\\\\Container\\\\ContainerInterface\\:\\:getParameter\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ApiBundle/Controller/UserRestController.php - - - - message: "#^Call to an undefined method Psr\\\\Container\\\\ContainerInterface\\:\\:getParameter\\(\\)\\.$#" - count: 3 - path: src/Wallabag/ApiBundle/Controller/WallabagRestController.php - - - - message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getConnection\\(\\)\\.$#" - count: 5 - path: src/Wallabag/CoreBundle/Command/InstallCommand.php - - message: "#^Call to an undefined method Wallabag\\\\CoreBundle\\\\Entity\\\\RuleInterface\\:\\:getConfig\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Controller/ConfigController.php - - - message: "#^Call to an undefined method Psr\\\\Container\\\\ContainerInterface\\:\\:getParameter\\(\\)\\.$#" - count: 1 - path: src/Wallabag/CoreBundle/Controller/StaticController.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Wallabag/CoreBundle/DependencyInjection/Configuration.php - - message: "#^Call to an undefined method Lexik\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpressionBuilder\\(\\)\\.$#" count: 1 @@ -45,11 +15,6 @@ parameters: count: 10 path: src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php - - - message: "#^Call to an undefined method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:getConnection\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/Command/ImportCommand.php - - message: "#^Call to an undefined method Wallabag\\\\ImportBundle\\\\Import\\\\ImportInterface\\:\\:setFilepath\\(\\)\\.$#" count: 1 @@ -70,11 +35,6 @@ parameters: count: 1 path: src/Wallabag/ImportBundle/Controller/WallabagController.php - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Wallabag/ImportBundle/DependencyInjection/Configuration.php - - message: "#^Call to an undefined method Scheb\\\\TwoFactorBundle\\\\Model\\\\Email\\\\TwoFactorInterface\\:\\:getName\\(\\)\\.$#" count: 2 @@ -94,3 +54,13 @@ parameters: message: "#^Property Tests\\\\Wallabag\\\\CoreBundle\\\\Helper\\\\RedirectTest\\:\\:\\$routerMock has unknown class PHPUnit_Framework_MockObject_MockObject as its type\\.$#" count: 1 path: tests/Wallabag/CoreBundle/Helper/RedirectTest.php + + - + message: "#^Method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch()#" + count: 15 + path: src/* + + - + message: "#^Method FOS\\\\UserBundle\\\\Model\\\\UserManagerInterface\\:\\:updateUser()#" + count: 7 + path: src/Wallabag/CoreBundle/Controller/ConfigController.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3e7588100..32d0a6d03 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -31,7 +31,7 @@ - - - + + + diff --git a/scripts/release.sh b/scripts/release.sh index 2ae964017..b9221fb7e 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -9,7 +9,7 @@ ENV=$4 rm -rf "${TMP_FOLDER:?}"/"$RELEASE_FOLDER" mkdir "$TMP_FOLDER"/"$RELEASE_FOLDER" -git clone https://github.com/wallabag/wallabag.git "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" +git clone https://github.com/wallabag/wallabag.git --single-branch --depth 1 --branch $1 "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && SYMFONY_ENV="$ENV" COMPOSER_MEMORY_LIMIT=-1 composer install -n --no-dev cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && php bin/console wallabag:install --env="$ENV" -n cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && php bin/console assets:install --env="$ENV" --symlink --relative diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index 20c34f55d..704cc9a90 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php @@ -2,20 +2,33 @@ namespace Wallabag\AnnotationBundle\Controller; +use Doctrine\ORM\EntityManagerInterface; use FOS\RestBundle\Controller\AbstractFOSRestController; use JMS\Serializer\SerializerInterface; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Annotation\Route; use Wallabag\AnnotationBundle\Entity\Annotation; use Wallabag\AnnotationBundle\Form\EditAnnotationType; use Wallabag\AnnotationBundle\Form\NewAnnotationType; +use Wallabag\AnnotationBundle\Repository\AnnotationRepository; use Wallabag\CoreBundle\Entity\Entry; class WallabagAnnotationController extends AbstractFOSRestController { + protected EntityManagerInterface $entityManager; + protected SerializerInterface $serializer; + protected FormFactoryInterface $formFactory; + + public function __construct(EntityManagerInterface $entityManager, SerializerInterface $serializer, FormFactoryInterface $formFactory) + { + $this->entityManager = $entityManager; + $this->serializer = $serializer; + $this->formFactory = $formFactory; + } + /** * Retrieve annotations for an entry. * @@ -25,16 +38,14 @@ class WallabagAnnotationController extends AbstractFOSRestController * * @return JsonResponse */ - public function getAnnotationsAction(Entry $entry) + public function getAnnotationsAction(Entry $entry, AnnotationRepository $annotationRepository) { - $annotationRows = $this - ->getDoctrine() - ->getRepository(Annotation::class) - ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); + $annotationRows = $annotationRepository->findByEntryIdAndUserId($entry->getId(), $this->getUser()->getId()); + $total = \count($annotationRows); $annotations = ['total' => $total, 'rows' => $annotationRows]; - $json = $this->get(SerializerInterface::class)->serialize($annotations, 'json'); + $json = $this->serializer->serialize($annotations, 'json'); return (new JsonResponse())->setJson($json); } @@ -52,21 +63,20 @@ class WallabagAnnotationController extends AbstractFOSRestController { $data = json_decode($request->getContent(), true); - $em = $this->get('doctrine')->getManager(); $annotation = new Annotation($this->getUser()); $annotation->setEntry($entry); - $form = $this->get(FormFactoryInterface::class)->createNamed('', NewAnnotationType::class, $annotation, [ + $form = $this->formFactory->createNamed('', NewAnnotationType::class, $annotation, [ 'csrf_protection' => false, 'allow_extra_fields' => true, ]); $form->submit($data); if ($form->isValid()) { - $em->persist($annotation); - $em->flush(); + $this->entityManager->persist($annotation); + $this->entityManager->flush(); - $json = $this->get(SerializerInterface::class)->serialize($annotation, 'json'); + $json = $this->serializer->serialize($annotation, 'json'); return JsonResponse::fromJsonString($json); } @@ -80,31 +90,35 @@ class WallabagAnnotationController extends AbstractFOSRestController * @see Wallabag\ApiBundle\Controller\WallabagRestController * * @Route("/annotations/{annotation}.{_format}", methods={"PUT"}, name="annotations_put_annotation", defaults={"_format": "json"}) - * @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation") * * @return JsonResponse */ - public function putAnnotationAction(Annotation $annotation, Request $request) + public function putAnnotationAction(Request $request, AnnotationRepository $annotationRepository, int $annotation) { - $data = json_decode($request->getContent(), true); + try { + $annotation = $this->validateAnnotation($annotationRepository, $annotation, $this->getUser()->getId()); - $form = $this->get(FormFactoryInterface::class)->createNamed('', EditAnnotationType::class, $annotation, [ - 'csrf_protection' => false, - 'allow_extra_fields' => true, - ]); - $form->submit($data); + $data = json_decode($request->getContent(), true, 512, \JSON_THROW_ON_ERROR); - if ($form->isValid()) { - $em = $this->get('doctrine')->getManager(); - $em->persist($annotation); - $em->flush(); + $form = $this->formFactory->createNamed('', EditAnnotationType::class, $annotation, [ + 'csrf_protection' => false, + 'allow_extra_fields' => true, + ]); + $form->submit($data); - $json = $this->get(SerializerInterface::class)->serialize($annotation, 'json'); + if ($form->isValid()) { + $this->entityManager->persist($annotation); + $this->entityManager->flush(); - return JsonResponse::fromJsonString($json); + $json = $this->serializer->serialize($annotation, 'json'); + + return JsonResponse::fromJsonString($json); + } + + return $form; + } catch (\InvalidArgumentException $e) { + throw new NotFoundHttpException($e); } - - return $form; } /** @@ -113,18 +127,33 @@ class WallabagAnnotationController extends AbstractFOSRestController * @see Wallabag\ApiBundle\Controller\WallabagRestController * * @Route("/annotations/{annotation}.{_format}", methods={"DELETE"}, name="annotations_delete_annotation", defaults={"_format": "json"}) - * @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation") * * @return JsonResponse */ - public function deleteAnnotationAction(Annotation $annotation) + public function deleteAnnotationAction(AnnotationRepository $annotationRepository, int $annotation) { - $em = $this->get('doctrine')->getManager(); - $em->remove($annotation); - $em->flush(); + try { + $annotation = $this->validateAnnotation($annotationRepository, $annotation, $this->getUser()->getId()); - $json = $this->get(SerializerInterface::class)->serialize($annotation, 'json'); + $this->entityManager->remove($annotation); + $this->entityManager->flush(); - return (new JsonResponse())->setJson($json); + $json = $this->serializer->serialize($annotation, 'json'); + + return (new JsonResponse())->setJson($json); + } catch (\InvalidArgumentException $e) { + throw new NotFoundHttpException($e); + } + } + + private function validateAnnotation(AnnotationRepository $annotationRepository, int $annotationId, int $userId) + { + $annotation = $annotationRepository->findOneByIdAndUserId($annotationId, $userId); + + if (null === $annotation) { + throw new NotFoundHttpException(); + } + + return $annotation; } } diff --git a/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php b/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php index 51c79c3d3..5161a4094 100644 --- a/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php +++ b/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php @@ -34,6 +34,15 @@ class AnnotationFixtures extends Fixture implements DependentFixtureInterface $this->addReference('annotation2', $annotation2); + $annotation3 = new Annotation($this->getReference('bob-user')); + $annotation3->setEntry($this->getReference('entry3')); + $annotation3->setText('This is my first annotation !'); + $annotation3->setQuote('content'); + + $manager->persist($annotation3); + + $this->addReference('annotation3', $annotation3); + $manager->flush(); } diff --git a/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php b/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php index 5e4e4e9c7..b3b5f8226 100644 --- a/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/AnnotationBundle/DependencyInjection/Configuration.php @@ -12,9 +12,6 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('wallabag_annotation'); - - return $treeBuilder; + return new TreeBuilder('wallabag_annotation'); } } diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index 8987b263a..d0ddd50de 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php @@ -49,6 +49,24 @@ class AnnotationRepository extends ServiceEntityRepository ; } + /** + * Find annotation by id and user. + * + * @param int $annotationId + * @param int $userId + * + * @return Annotation + */ + public function findOneByIdAndUserId($annotationId, $userId) + { + return $this->createQueryBuilder('a') + ->where('a.id = :annotationId')->setParameter('annotationId', $annotationId) + ->andWhere('a.user = :userId')->setParameter('userId', $userId) + ->setMaxResults(1) + ->getQuery() + ->getOneOrNullResult(); + } + /** * Find annotations for entry id. * @@ -57,7 +75,7 @@ class AnnotationRepository extends ServiceEntityRepository * * @return array */ - public function findAnnotationsByPageId($entryId, $userId) + public function findByEntryIdAndUserId($entryId, $userId) { return $this->createQueryBuilder('a') ->where('a.entry = :entryId')->setParameter('entryId', $entryId) @@ -72,9 +90,9 @@ class AnnotationRepository extends ServiceEntityRepository * * @param int $entryId * - * @return array + * @return Annotation|null */ - public function findLastAnnotationByPageId($entryId, $userId) + public function findLastAnnotationByUserId($entryId, $userId) { return $this->createQueryBuilder('a') ->where('a.entry = :entryId')->setParameter('entryId', $entryId) diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php index 7eb7a787a..5ffd0eb2e 100644 --- a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php +++ b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php @@ -3,8 +3,7 @@ namespace Wallabag\ApiBundle\Controller; use Nelmio\ApiDocBundle\Annotation\Operation; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; -use Swagger\Annotations as SWG; +use OpenApi\Annotations as OA; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; @@ -19,15 +18,17 @@ class AnnotationRestController extends WallabagRestController * @Operation( * tags={"Annotations"}, * summary="Retrieve annotations for an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -52,40 +53,48 @@ class AnnotationRestController extends WallabagRestController * @Operation( * tags={"Annotations"}, * summary="Creates a new annotation.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" - * ), - * @SWG\Parameter( - * name="ranges", - * in="body", - * description="The range array for the annotation", - * required=false, - * pattern="\w+", - * @SWG\Schema( - * type="array", - * @SWG\Items(type="string") + * @OA\Schema( + * type="integer", + * pattern="\w+", * ) * ), - * @SWG\Parameter( - * name="quote", - * in="body", - * description="The annotated text", - * required=false, - * @SWG\Schema(type="string") + * @OA\RequestBody( + * @OA\JsonContent( + * type="object", + * required={"text"}, + * @OA\Property( + * property="ranges", + * type="array", + * description="The range array for the annotation", + * @OA\Items( + * type="string", + * pattern="\w+", + * ) + * ), + * @OA\Property( + * property="quote", + * type="array", + * description="The annotated text", + * @OA\Items( + * type="string", + * ) + * ), + * @OA\Property( + * property="text", + * type="array", + * description="Content of annotation", + * @OA\Items( + * type="string", + * ) + * ), + * ) * ), - * @SWG\Parameter( - * name="text", - * in="body", - * description="Content of annotation", - * required=true, - * @SWG\Schema(type="string") - * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -111,26 +120,27 @@ class AnnotationRestController extends WallabagRestController * @Operation( * tags={"Annotations"}, * summary="Updates an annotation.", - * @SWG\Parameter( + * @OA\Parameter( * name="annotation", * in="path", * description="The annotation ID", * required=true, - * pattern="\w+", - * type="string" + * @OA\Schema( + * type="string", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) * ) * * @Route("/api/annotations/{annotation}.{_format}", methods={"PUT"}, name="api_put_annotation", defaults={"_format": "json"}) - * @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation") * * @return JsonResponse */ - public function putAnnotationAction(Annotation $annotation, Request $request) + public function putAnnotationAction(int $annotation, Request $request) { $this->validateAuthentication(); @@ -146,26 +156,27 @@ class AnnotationRestController extends WallabagRestController * @Operation( * tags={"Annotations"}, * summary="Removes an annotation.", - * @SWG\Parameter( + * @OA\Parameter( * name="annotation", * in="path", * description="The annotation ID", * required=true, - * pattern="\w+", - * type="string" + * @OA\Schema( + * type="string", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) * ) * * @Route("/api/annotations/{annotation}.{_format}", methods={"DELETE"}, name="api_delete_annotation", defaults={"_format": "json"}) - * @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation") * * @return JsonResponse */ - public function deleteAnnotationAction(Annotation $annotation) + public function deleteAnnotationAction(int $annotation) { $this->validateAuthentication(); diff --git a/src/Wallabag/ApiBundle/Controller/ConfigRestController.php b/src/Wallabag/ApiBundle/Controller/ConfigRestController.php index 0bcc20e01..6539291ff 100644 --- a/src/Wallabag/ApiBundle/Controller/ConfigRestController.php +++ b/src/Wallabag/ApiBundle/Controller/ConfigRestController.php @@ -5,7 +5,7 @@ namespace Wallabag\ApiBundle\Controller; use JMS\Serializer\SerializationContext; use JMS\Serializer\SerializerInterface; use Nelmio\ApiDocBundle\Annotation\Operation; -use Swagger\Annotations as SWG; +use OpenApi\Annotations as OA; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Annotation\Route; @@ -17,7 +17,7 @@ class ConfigRestController extends WallabagRestController * @Operation( * tags={"Config"}, * summary="Retrieve configuration for current user.", - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -27,11 +27,11 @@ class ConfigRestController extends WallabagRestController * * @return JsonResponse */ - public function getConfigAction() + public function getConfigAction(SerializerInterface $serializer) { $this->validateAuthentication(); - $json = $this->get(SerializerInterface::class)->serialize( + $json = $serializer->serialize( $this->getUser()->getConfig(), 'json', SerializationContext::create()->setGroups(['config_api']) diff --git a/src/Wallabag/ApiBundle/Controller/DeveloperController.php b/src/Wallabag/ApiBundle/Controller/DeveloperController.php index c15c57678..3fdf55d0a 100644 --- a/src/Wallabag/ApiBundle/Controller/DeveloperController.php +++ b/src/Wallabag/ApiBundle/Controller/DeveloperController.php @@ -2,17 +2,18 @@ namespace Wallabag\ApiBundle\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Routing\Annotation\Route; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\ApiBundle\Entity\Client; use Wallabag\ApiBundle\Form\Type\ClientType; +use Wallabag\ApiBundle\Repository\ClientRepository; -class DeveloperController extends Controller +class DeveloperController extends AbstractController { /** * List all clients and link to create a new one. @@ -21,9 +22,9 @@ class DeveloperController extends Controller * * @return Response */ - public function indexAction() + public function indexAction(ClientRepository $repo) { - $clients = $this->get('doctrine')->getRepository(Client::class)->findByUser($this->getUser()->getId()); + $clients = $repo->findByUser($this->getUser()->getId()); return $this->render('@WallabagCore/Developer/index.html.twig', [ 'clients' => $clients, @@ -37,21 +38,20 @@ class DeveloperController extends Controller * * @return Response */ - public function createClientAction(Request $request) + public function createClientAction(Request $request, EntityManagerInterface $entityManager, TranslatorInterface $translator) { - $em = $this->get('doctrine')->getManager(); $client = new Client($this->getUser()); $clientForm = $this->createForm(ClientType::class, $client); $clientForm->handleRequest($request); if ($clientForm->isSubmitted() && $clientForm->isValid()) { $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']); - $em->persist($client); - $em->flush(); + $entityManager->persist($client); + $entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()]) + $translator->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()]) ); return $this->render('@WallabagCore/Developer/client_parameters.html.twig', [ @@ -73,19 +73,18 @@ class DeveloperController extends Controller * * @return RedirectResponse */ - public function deleteClientAction(Client $client) + public function deleteClientAction(Client $client, EntityManagerInterface $entityManager, TranslatorInterface $translator) { if (null === $this->getUser() || $client->getUser()->getId() !== $this->getUser()->getId()) { throw $this->createAccessDeniedException('You can not access this client.'); } - $em = $this->get('doctrine')->getManager(); - $em->remove($client); - $em->flush(); + $entityManager->remove($client); + $entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()]) + $translator->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()]) ); return $this->redirect($this->generateUrl('developer')); @@ -100,6 +99,9 @@ class DeveloperController extends Controller */ public function howtoFirstAppAction() { - return $this->render('@WallabagCore/Developer/howto_app.html.twig'); + return $this->render('@WallabagCore/Developer/howto_app.html.twig', + [ + 'wallabag_url' => $this->getParameter('domain_name'), + ]); } } diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index cf504babb..748e5b0cc 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -5,8 +5,9 @@ namespace Wallabag\ApiBundle\Controller; use Hateoas\Configuration\Route as HateoasRoute; use Hateoas\Representation\Factory\PagerfantaFactory; use Nelmio\ApiDocBundle\Annotation\Operation; +use OpenApi\Annotations as OA; use Pagerfanta\Pagerfanta; -use Swagger\Annotations as SWG; +use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; @@ -23,6 +24,7 @@ use Wallabag\CoreBundle\Helper\EntriesExport; use Wallabag\CoreBundle\Helper\TagsAssigner; use Wallabag\CoreBundle\Helper\UrlHasher; use Wallabag\CoreBundle\Repository\EntryRepository; +use Wallabag\CoreBundle\Repository\TagRepository; class EntryRestController extends WallabagRestController { @@ -36,46 +38,46 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Check if an entry exist by url.", - * @SWG\Parameter( + * @OA\Parameter( * name="return_id", - * in="body", + * in="query", * description="Set 1 if you want to retrieve ID in case entry(ies) exists, 0 by default", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="url", - * in="body", + * in="query", * description="DEPRECATED, use hashed_url instead. An url", * required=true, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="urls", - * in="body", + * in="query", * description="DEPRECATED, use hashed_urls instead. An array of urls (?urls[]=http...&urls[]=http...)", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="hashed_url", - * in="body", + * in="query", * description="Hashed url using SHA1 to check if it exists. A hashed url", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="hashed_urls", - * in="body", + * in="query", * description="An array of hashed urls using SHA1 to check if they exist. An array of hashed urls (?hashed_urls[]=xxx...&hashed_urls[]=xxx...)", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -85,10 +87,9 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function getEntriesExistsAction(Request $request) + public function getEntriesExistsAction(Request $request, EntryRepository $entryRepository) { $this->validateAuthentication(); - $repo = $this->get('doctrine')->getRepository(Entry::class); $returnId = (null === $request->query->get('return_id')) ? false : (bool) $request->query->get('return_id'); @@ -116,7 +117,7 @@ class EntryRestController extends WallabagRestController } $results = array_fill_keys($hashedUrls, null); - $res = $repo->findByUserIdAndBatchHashedUrls($this->getUser()->getId(), $hashedUrls); + $res = $entryRepository->findByUserIdAndBatchHashedUrls($this->getUser()->getId(), $hashedUrls); foreach ($res as $e) { $_hashedUrl = array_keys($hashedUrls, 'blah', true); if ([] !== array_keys($hashedUrls, $e['hashedUrl'], true)) { @@ -152,124 +153,123 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Retrieve all entries. It could be filtered by many options.", - * @SWG\Parameter( + * @OA\Parameter( * name="archive", - * in="body", + * in="query", * description="filter by archived status. all entries by default.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="starred", - * in="body", + * in="query", * description="filter by starred status. all entries by default", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="sort", - * in="body", + * in="query", * description="sort entries by date.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * enum={"created", "updated", "archived"}, * default="created" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="order", - * in="body", + * in="query", * description="order of sort.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * enum={"asc", "desc"}, * default="desc" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="page", - * in="body", + * in="query", * description="what page you want.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * default=1 * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="perPage", - * in="body", + * in="query", * description="results per page.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * default=30 * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="tags", - * in="body", - * description="a list of tags url encoded. Will returns entries that matches ALL tags.", + * in="query", + * description="a comma-seperated list of tags url encoded. Will returns entries that matches ALL tags.", * required=false, - * format="comma-seperated", - * @SWG\Schema( + * @OA\Schema( * type="string", * example="api,rest" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="since", - * in="body", + * in="query", * description="The timestamp since when you want entries updated.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * default=0 * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="public", - * in="body", + * in="query", * description="filter by entries with a public link. all entries by default", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="detail", - * in="body", + * in="query", * description="include content field if 'full'. 'full' by default for backward compatibility.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * enum={"metadata", "full"}, * default="full" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="domain_name", - * in="body", + * in="query", * description="filter entries with the given domain name", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="example.com", * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -279,7 +279,7 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function getEntriesAction(Request $request) + public function getEntriesAction(Request $request, EntryRepository $entryRepository) { $this->validateAuthentication(); @@ -297,7 +297,7 @@ class EntryRestController extends WallabagRestController try { /** @var Pagerfanta $pager */ - $pager = $this->get(EntryRepository::class)->findEntries( + $pager = $entryRepository->findEntries( $this->getUser()->getId(), $isArchived, $isStarred, @@ -346,15 +346,17 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Retrieve a single entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -378,23 +380,27 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Retrieve a single entry as a predefined format.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="_format", * in="path", * description="", * required=true, - * type="string", - * enum={"xml", "json", "txt", "csv", "pdf", "epub", "mobi"}, + * @OA\Schema( + * type="string", + * enum={"xml", "json", "txt", "csv", "pdf", "epub", "mobi"}, + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -404,12 +410,12 @@ class EntryRestController extends WallabagRestController * * @return Response */ - public function getEntryExportAction(Entry $entry, Request $request) + public function getEntryExportAction(Entry $entry, Request $request, EntriesExport $entriesExport) { $this->validateAuthentication(); $this->validateUserAccess($entry->getUser()->getId()); - return $this->get(EntriesExport::class) + return $entriesExport ->setEntries($entry) ->updateTitle('entry') ->updateAuthor('entry') @@ -422,14 +428,14 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Handles an entries list and delete URL.", - * @SWG\Parameter( + * @OA\Parameter( * name="urls", - * in="body", + * in="query", * description="Urls (as an array) to delete. A JSON array of urls [{'url': 'http://...'}, {'url': 'http://...'}]", * required=true, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -439,7 +445,7 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function deleteEntriesListAction(Request $request) + public function deleteEntriesListAction(Request $request, EntryRepository $entryRepository, EventDispatcherInterface $eventDispatcher) { $this->validateAuthentication(); @@ -453,7 +459,7 @@ class EntryRestController extends WallabagRestController // handle multiple urls foreach ($urls as $key => $url) { - $entry = $this->get(EntryRepository::class)->findByUrlAndUserId( + $entry = $entryRepository->findByUrlAndUserId( $url, $this->getUser()->getId() ); @@ -462,11 +468,10 @@ class EntryRestController extends WallabagRestController if (false !== $entry) { // entry deleted, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); + $eventDispatcher->dispatch(new EntryDeletedEvent($entry), EntryDeletedEvent::NAME); - $em = $this->get('doctrine')->getManager(); - $em->remove($entry); - $em->flush(); + $this->entityManager->remove($entry); + $this->entityManager->flush(); } $results[$key]['entry'] = $entry instanceof Entry ? true : false; @@ -481,14 +486,14 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Handles an entries list and create URL.", - * @SWG\Parameter( + * @OA\Parameter( * name="urls", - * in="formData", + * in="query", * description="Urls (as an array) to create. A JSON array of urls [{'url': 'http://...'}, {'url': 'http://...'}]", * required=true, - * type="string" + * @OA\Schema(type="string") * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -500,13 +505,13 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function postEntriesListAction(Request $request) + public function postEntriesListAction(Request $request, EntryRepository $entryRepository, EventDispatcherInterface $eventDispatcher, ContentProxy $contentProxy) { $this->validateAuthentication(); $urls = json_decode($request->query->get('urls', [])); - $limit = $this->container->getParameter('wallabag_core.api_limit_mass_actions'); + $limit = $this->getParameter('wallabag_core.api_limit_mass_actions'); if (\count($urls) > $limit) { throw new HttpException(400, 'API limit reached'); @@ -519,7 +524,7 @@ class EntryRestController extends WallabagRestController // handle multiple urls foreach ($urls as $key => $url) { - $entry = $this->get(EntryRepository::class)->findByUrlAndUserId( + $entry = $entryRepository->findByUrlAndUserId( $url, $this->getUser()->getId() ); @@ -529,17 +534,16 @@ class EntryRestController extends WallabagRestController if (false === $entry) { $entry = new Entry($this->getUser()); - $this->get(ContentProxy::class)->updateEntry($entry, $url); + $contentProxy->updateEntry($entry, $url); } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); $results[$key]['entry'] = $entry instanceof Entry ? $entry->getId() : false; // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); } return $this->sendResponse($results); @@ -554,126 +558,127 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Create an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="url", - * in="body", + * in="query", * description="Url for the entry.", * required=true, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="http://www.test.com/article.html" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="title", - * in="body", + * in="query", * description="Optional, we'll get the title from the page.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="tags", - * in="body", + * in="query", * description="a comma-separated list of tags.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="tag1,tag2,tag3" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="archive", - * in="body", + * in="query", * description="entry already archived", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="starred", - * in="body", + * in="query", * description="entry already starred", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="content", - * in="body", + * in="query", * description="Content of the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="language", - * in="body", + * in="query", * description="Language of the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="preview_picture", - * in="body", + * in="query", * description="Preview picture of the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="published_at", - * in="body", + * in="query", * description="Published date of the entry", * required=false, - * format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp (integer)", - * @SWG\Schema( + * + * @OA\Schema( * type="string", + * format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp (integer)", * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="authors", - * in="body", + * in="query", * description="Authors of the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="Name Firstname,author2,author3" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="public", - * in="body", + * in="query", * description="will generate a public link for the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="origin_url", - * in="body", + * in="query", * description="Origin url for the entry (from where you found it).", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="http://www.test.com/article.html" * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -683,13 +688,13 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function postEntriesAction(Request $request) + public function postEntriesAction(Request $request, EntryRepository $entryRepository, ContentProxy $contentProxy, LoggerInterface $logger, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher) { $this->validateAuthentication(); $url = $request->request->get('url'); - $entry = $this->get(EntryRepository::class)->findByUrlAndUserId( + $entry = $entryRepository->findByUrlAndUserId( $url, $this->getUser()->getId() ); @@ -702,7 +707,7 @@ class EntryRestController extends WallabagRestController $data = $this->retrieveValueFromRequest($request); try { - $this->get(ContentProxy::class)->updateEntry( + $contentProxy->updateEntry( $entry, $entry->getUrl(), [ @@ -717,10 +722,10 @@ class EntryRestController extends WallabagRestController ] ); } catch (\Exception $e) { - // $this->get('logger')->error('Error while saving an entry', [ - // 'exception' => $e, - // 'entry' => $entry, - // ]); + $logger->error('Error while saving an entry', [ + 'exception' => $e, + 'entry' => $entry, + ]); } if (null !== $data['isArchived']) { @@ -732,7 +737,7 @@ class EntryRestController extends WallabagRestController } if (!empty($data['tags'])) { - $this->get(TagsAssigner::class)->assignTagsToEntry($entry, $data['tags']); + $tagsAssigner->assignTagsToEntry($entry, $data['tags']); } if (!empty($data['origin_url'])) { @@ -748,19 +753,18 @@ class EntryRestController extends WallabagRestController } if (empty($entry->getDomainName())) { - $this->get(ContentProxy::class)->setEntryDomainName($entry); + $contentProxy->setEntryDomainName($entry); } if (empty($entry->getTitle())) { - $this->get(ContentProxy::class)->setDefaultEntryTitle($entry); + $contentProxy->setDefaultEntryTitle($entry); } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); return $this->sendResponse($entry); } @@ -771,114 +775,118 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Change several properties of an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="title", - * in="body", + * in="query", * description="", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="tags", - * in="body", + * in="query", * description="a comma-separated list of tags.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="tag1,tag2,tag3", * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="archive", - * in="body", + * in="query", * description="archived the entry.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="starred", - * in="body", + * in="query", * description="starred the entry.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="content", - * in="body", + * in="query", * description="Content of the entry", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="language", - * in="body", + * in="query", * description="Language of the entry", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="preview_picture", - * in="body", + * in="query", * description="Preview picture of the entry", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="published_at", - * in="body", + * in="query", * description="Published date of the entry", * required=false, - * format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp", - * @SWG\Schema(type="datetime|integer") + * @OA\Schema( + * type="datetime|integer", + * format="YYYY-MM-DDTHH:II:SS+TZ or a timestamp", + * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="authors", - * in="body", + * in="query", * description="Authors of the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="Name Firstname,author2,author3", * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="public", - * in="body", + * in="query", * description="will generate a public link for the entry", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * enum={"1", "0"}, * default="0" * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="origin_url", - * in="body", + * in="query", * description="Origin url for the entry (from where you found it).", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="http://www.test.com/article.html", * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -888,13 +896,11 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function patchEntriesAction(Entry $entry, Request $request) + public function patchEntriesAction(Entry $entry, Request $request, ContentProxy $contentProxy, LoggerInterface $logger, TagsAssigner $tagsAssigner, EventDispatcherInterface $eventDispatcher) { $this->validateAuthentication(); $this->validateUserAccess($entry->getUser()->getId()); - $contentProxy = $this->get(ContentProxy::class); - $data = $this->retrieveValueFromRequest($request); // this is a special case where user want to manually update the entry content @@ -911,10 +917,10 @@ class EntryRestController extends WallabagRestController true ); } catch (\Exception $e) { - // $this->get('logger')->error('Error while saving an entry', [ - // 'exception' => $e, - // 'entry' => $entry, - // ]); + $logger->error('Error while saving an entry', [ + 'exception' => $e, + 'entry' => $entry, + ]); } } @@ -948,7 +954,7 @@ class EntryRestController extends WallabagRestController if (!empty($data['tags'])) { $entry->removeAllTags(); - $this->get(TagsAssigner::class)->assignTagsToEntry($entry, $data['tags']); + $tagsAssigner->assignTagsToEntry($entry, $data['tags']); } if (null !== $data['isPublic']) { @@ -964,19 +970,18 @@ class EntryRestController extends WallabagRestController } if (empty($entry->getDomainName())) { - $this->get(ContentProxy::class)->setEntryDomainName($entry); + $contentProxy->setEntryDomainName($entry); } if (empty($entry->getTitle())) { - $this->get(ContentProxy::class)->setDefaultEntryTitle($entry); + $contentProxy->setDefaultEntryTitle($entry); } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); return $this->sendResponse($entry); } @@ -988,15 +993,17 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Reload an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1006,33 +1013,32 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function patchEntriesReloadAction(Entry $entry) + public function patchEntriesReloadAction(Entry $entry, ContentProxy $contentProxy, LoggerInterface $logger, EventDispatcherInterface $eventDispatcher) { $this->validateAuthentication(); $this->validateUserAccess($entry->getUser()->getId()); try { - $this->get(ContentProxy::class)->updateEntry($entry, $entry->getUrl()); + $contentProxy->updateEntry($entry, $entry->getUrl()); } catch (\Exception $e) { - // $this->get('logger')->error('Error while saving an entry', [ - // 'exception' => $e, - // 'entry' => $entry, - // ]); + $logger->error('Error while saving an entry', [ + 'exception' => $e, + 'entry' => $entry, + ]); return new JsonResponse([], 304); } // if refreshing entry failed, don't save it - if ($this->container->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { + if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { return new JsonResponse([], 304); } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); return $this->sendResponse($entry); } @@ -1043,18 +1049,18 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Delete permanently an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="expect", - * in="body", + * in="query", * description="Only returns the id instead of the deleted entry's full entity if 'id' is specified.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * enum={"id", "entry"}, * default="entry" * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1064,7 +1070,7 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function deleteEntriesAction(Entry $entry, Request $request) + public function deleteEntriesAction(Entry $entry, Request $request, EventDispatcherInterface $eventDispatcher) { $expect = $request->query->get('expect', 'entry'); if (!\in_array($expect, ['id', 'entry'], true)) { @@ -1083,11 +1089,10 @@ class EntryRestController extends WallabagRestController } // entry deleted, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); + $eventDispatcher->dispatch(new EntryDeletedEvent($entry), EntryDeletedEvent::NAME); - $em = $this->get('doctrine')->getManager(); - $em->remove($entry); - $em->flush(); + $this->entityManager->remove($entry); + $this->entityManager->flush(); return $response; } @@ -1098,15 +1103,17 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Retrieve all tags for an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1130,25 +1137,27 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Add one or more tags to an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="tags", - * in="body", + * in="query", * description="a comma-separated list of tags.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="tag1,tag2,tag3", * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1158,19 +1167,18 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function postEntriesTagsAction(Request $request, Entry $entry) + public function postEntriesTagsAction(Request $request, Entry $entry, TagsAssigner $tagsAssigner) { $this->validateAuthentication(); $this->validateUserAccess($entry->getUser()->getId()); $tags = $request->request->get('tags', ''); if (!empty($tags)) { - $this->get(TagsAssigner::class)->assignTagsToEntry($entry, $tags); + $tagsAssigner->assignTagsToEntry($entry, $tags); } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); return $this->sendResponse($entry); } @@ -1181,23 +1189,27 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Permanently remove one tag for an entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="entry", * in="path", * description="The entry ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="tag", * in="path", * description="The tag ID", * required=true, - * pattern="\w+", - * type="integer" + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1213,9 +1225,9 @@ class EntryRestController extends WallabagRestController $this->validateUserAccess($entry->getUser()->getId()); $entry->removeTag($tag); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + + $this->entityManager->persist($entry); + $this->entityManager->flush(); return $this->sendResponse($entry); } @@ -1226,14 +1238,14 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Handles an entries list delete tags from them.", - * @SWG\Parameter( + * @OA\Parameter( * name="list", - * in="body", + * in="query", * description="Urls (as an array) to handle. A JSON array of urls [{'url': 'http://...','tags': 'tag1, tag2'}, {'url': 'http://...','tags': 'tag1, tag2'}]", * required=true, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1243,7 +1255,7 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function deleteEntriesTagsListAction(Request $request) + public function deleteEntriesTagsListAction(Request $request, TagRepository $tagRepository, EntryRepository $entryRepository) { $this->validateAuthentication(); @@ -1257,7 +1269,7 @@ class EntryRestController extends WallabagRestController $results = []; foreach ($list as $key => $element) { - $entry = $this->get(EntryRepository::class)->findByUrlAndUserId( + $entry = $entryRepository->findByUrlAndUserId( $element->url, $this->getUser()->getId() ); @@ -1272,18 +1284,15 @@ class EntryRestController extends WallabagRestController foreach ($tags as $label) { $label = trim($label); - $tag = $this->get('doctrine') - ->getRepository(Tag::class) - ->findOneByLabel($label); + $tag = $tagRepository->findOneByLabel($label); if (false !== $tag) { $entry->removeTag($tag); } } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); } } @@ -1296,14 +1305,14 @@ class EntryRestController extends WallabagRestController * @Operation( * tags={"Entries"}, * summary="Handles an entries list and add tags to them.", - * @SWG\Parameter( + * @OA\Parameter( * name="list", - * in="formData", + * in="query", * description="Urls (as an array) to handle. A JSON array of urls [{'url': 'http://...','tags': 'tag1, tag2'}, {'url': 'http://...','tags': 'tag1, tag2'}]", * required=true, - * type="string" + * @OA\Schema(type="string") * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -1313,7 +1322,7 @@ class EntryRestController extends WallabagRestController * * @return JsonResponse */ - public function postEntriesTagsListAction(Request $request) + public function postEntriesTagsListAction(Request $request, EntryRepository $entryRepository, TagsAssigner $tagsAssigner) { $this->validateAuthentication(); @@ -1327,7 +1336,7 @@ class EntryRestController extends WallabagRestController // handle multiple urls foreach ($list as $key => $element) { - $entry = $this->get(EntryRepository::class)->findByUrlAndUserId( + $entry = $entryRepository->findByUrlAndUserId( $element->url, $this->getUser()->getId() ); @@ -1338,11 +1347,10 @@ class EntryRestController extends WallabagRestController $tags = $element->tags; if (false !== $entry && !(empty($tags))) { - $this->get(TagsAssigner::class)->assignTagsToEntry($entry, $tags); + $tagsAssigner->assignTagsToEntry($entry, $tags); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); } } diff --git a/src/Wallabag/ApiBundle/Controller/SearchRestController.php b/src/Wallabag/ApiBundle/Controller/SearchRestController.php index caaf4772a..cd71c83f1 100644 --- a/src/Wallabag/ApiBundle/Controller/SearchRestController.php +++ b/src/Wallabag/ApiBundle/Controller/SearchRestController.php @@ -5,9 +5,9 @@ namespace Wallabag\ApiBundle\Controller; use Hateoas\Configuration\Route as HateoasRoute; use Hateoas\Representation\Factory\PagerfantaFactory; use Nelmio\ApiDocBundle\Annotation\Operation; +use OpenApi\Annotations as OA; use Pagerfanta\Doctrine\ORM\QueryAdapter as DoctrineORMAdapter; use Pagerfanta\Pagerfanta; -use Swagger\Annotations as SWG; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; @@ -21,34 +21,34 @@ class SearchRestController extends WallabagRestController * @Operation( * tags={"Search"}, * summary="Search all entries by term.", - * @SWG\Parameter( + * @OA\Parameter( * name="term", - * in="body", + * in="query", * description="Any query term", * required=false, - * @SWG\Schema(type="string") + * @OA\Schema(type="string") * ), - * @SWG\Parameter( + * @OA\Parameter( * name="page", - * in="body", + * in="query", * description="what page you want.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * default=1 * ) * ), - * @SWG\Parameter( + * @OA\Parameter( * name="perPage", - * in="body", + * in="query", * description="results per page.", * required=false, - * @SWG\Schema( + * @OA\Schema( * type="integer", * default=30 * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -58,7 +58,7 @@ class SearchRestController extends WallabagRestController * * @return JsonResponse */ - public function getSearchAction(Request $request) + public function getSearchAction(Request $request, EntryRepository $entryRepository) { $this->validateAuthentication(); @@ -66,12 +66,11 @@ class SearchRestController extends WallabagRestController $page = (int) $request->query->get('page', 1); $perPage = (int) $request->query->get('perPage', 30); - $qb = $this->get(EntryRepository::class) - ->getBuilderForSearchByUser( - $this->getUser()->getId(), - $term, - null - ); + $qb = $entryRepository->getBuilderForSearchByUser( + $this->getUser()->getId(), + $term, + null + ); $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); $pager = new Pagerfanta($pagerAdapter); diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index 7e943be55..03bf8bef9 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php @@ -2,14 +2,15 @@ namespace Wallabag\ApiBundle\Controller; -use JMS\Serializer\SerializerInterface; use Nelmio\ApiDocBundle\Annotation\Operation; -use Swagger\Annotations as SWG; +use OpenApi\Annotations as OA; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; +use Wallabag\CoreBundle\Repository\EntryRepository; +use Wallabag\CoreBundle\Repository\TagRepository; class TagRestController extends WallabagRestController { @@ -19,7 +20,7 @@ class TagRestController extends WallabagRestController * @Operation( * tags={"Tags"}, * summary="Retrieve all tags.", - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -29,15 +30,13 @@ class TagRestController extends WallabagRestController * * @return JsonResponse */ - public function getTagsAction() + public function getTagsAction(TagRepository $tagRepository) { $this->validateAuthentication(); - $tags = $this->get('doctrine') - ->getRepository(Tag::class) - ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); + $tags = $tagRepository->findAllFlatTagsWithNbEntries($this->getUser()->getId()); - $json = $this->get(SerializerInterface::class)->serialize($tags, 'json'); + $json = $this->serializer->serialize($tags, 'json'); return (new JsonResponse())->setJson($json); } @@ -48,15 +47,17 @@ class TagRestController extends WallabagRestController * @Operation( * tags={"Tags"}, * summary="Permanently remove one tag from every entry by passing the Tag label.", - * @SWG\Parameter( + * @OA\Parameter( * name="tag", - * in="body", + * in="query", * description="Tag as a string", * required=true, - * pattern="\w+", - * @SWG\Schema(type="string") + * @OA\Schema( + * type="string", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -66,12 +67,12 @@ class TagRestController extends WallabagRestController * * @return JsonResponse */ - public function deleteTagLabelAction(Request $request) + public function deleteTagLabelAction(Request $request, TagRepository $tagRepository, EntryRepository $entryRepository) { $this->validateAuthentication(); $label = $request->get('tag', ''); - $tags = $this->get('doctrine')->getRepository(Tag::class)->findByLabelsAndUser([$label], $this->getUser()->getId()); + $tags = $tagRepository->findByLabelsAndUser([$label], $this->getUser()->getId()); if (empty($tags)) { throw $this->createNotFoundException('Tag not found'); @@ -79,13 +80,11 @@ class TagRestController extends WallabagRestController $tag = $tags[0]; - $this->get('doctrine') - ->getRepository(Entry::class) - ->removeTag($this->getUser()->getId(), $tag); + $entryRepository->removeTag($this->getUser()->getId(), $tag); $this->cleanOrphanTag($tag); - $json = $this->get(SerializerInterface::class)->serialize($tag, 'json'); + $json = $this->serializer->serialize($tag, 'json'); return (new JsonResponse())->setJson($json); } @@ -96,17 +95,17 @@ class TagRestController extends WallabagRestController * @Operation( * tags={"Tags"}, * summary="Permanently remove some tags from every entry.", - * @SWG\Parameter( + * @OA\Parameter( * name="tags", - * in="body", + * in="query", * description="Tags as strings (comma splitted)", * required=true, - * @SWG\Schema( + * @OA\Schema( * type="string", * example="tag1,tag2", * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -116,25 +115,23 @@ class TagRestController extends WallabagRestController * * @return JsonResponse */ - public function deleteTagsLabelAction(Request $request) + public function deleteTagsLabelAction(Request $request, TagRepository $tagRepository, EntryRepository $entryRepository) { $this->validateAuthentication(); $tagsLabels = $request->get('tags', ''); - $tags = $this->get('doctrine')->getRepository(Tag::class)->findByLabelsAndUser(explode(',', $tagsLabels), $this->getUser()->getId()); + $tags = $tagRepository->findByLabelsAndUser(explode(',', $tagsLabels), $this->getUser()->getId()); if (empty($tags)) { throw $this->createNotFoundException('Tags not found'); } - $this->get('doctrine') - ->getRepository(Entry::class) - ->removeTags($this->getUser()->getId(), $tags); + $entryRepository->removeTags($this->getUser()->getId(), $tags); $this->cleanOrphanTag($tags); - $json = $this->get(SerializerInterface::class)->serialize($tags, 'json'); + $json = $this->serializer->serialize($tags, 'json'); return (new JsonResponse())->setJson($json); } @@ -145,15 +142,17 @@ class TagRestController extends WallabagRestController * @Operation( * tags={"Tags"}, * summary="Permanently remove one tag from every entry by passing the Tag ID.", - * @SWG\Parameter( + * @OA\Parameter( * name="tag", - * in="body", + * in="path", * description="The tag", * required=true, - * pattern="\w+", - * @SWG\Schema(type="integer") + * @OA\Schema( + * type="integer", + * pattern="\w+", + * ) * ), - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) @@ -163,23 +162,21 @@ class TagRestController extends WallabagRestController * * @return JsonResponse */ - public function deleteTagAction(Tag $tag) + public function deleteTagAction(Tag $tag, TagRepository $tagRepository, EntryRepository $entryRepository) { $this->validateAuthentication(); - $tagFromDb = $this->get('doctrine')->getRepository(Tag::class)->findByLabelsAndUser([$tag->getLabel()], $this->getUser()->getId()); + $tagFromDb = $tagRepository->findByLabelsAndUser([$tag->getLabel()], $this->getUser()->getId()); if (empty($tagFromDb)) { throw $this->createNotFoundException('Tag not found'); } - $this->get('doctrine') - ->getRepository(Entry::class) - ->removeTag($this->getUser()->getId(), $tag); + $entryRepository->removeTag($this->getUser()->getId(), $tag); $this->cleanOrphanTag($tag); - $json = $this->get(SerializerInterface::class)->serialize($tag, 'json'); + $json = $this->serializer->serialize($tag, 'json'); return (new JsonResponse())->setJson($json); } @@ -195,14 +192,12 @@ class TagRestController extends WallabagRestController $tags = [$tags]; } - $em = $this->get('doctrine')->getManager(); - foreach ($tags as $tag) { if (0 === \count($tag->getEntries())) { - $em->remove($tag); + $this->entityManager->remove($tag); } } - $em->flush(); + $this->entityManager->flush(); } } diff --git a/src/Wallabag/ApiBundle/Controller/TaggingRuleRestController.php b/src/Wallabag/ApiBundle/Controller/TaggingRuleRestController.php index d7bf347d1..d20cfb19c 100644 --- a/src/Wallabag/ApiBundle/Controller/TaggingRuleRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TaggingRuleRestController.php @@ -5,7 +5,7 @@ namespace Wallabag\ApiBundle\Controller; use JMS\Serializer\SerializationContext; use JMS\Serializer\SerializerBuilder; use Nelmio\ApiDocBundle\Annotation\Operation; -use Swagger\Annotations as SWG; +use OpenApi\Annotations as OA; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; @@ -17,7 +17,7 @@ class TaggingRuleRestController extends WallabagRestController * @Operation( * tags={"TaggingRule"}, * summary="Export all tagging rules as a json file.", - * @SWG\Response( + * @OA\Response( * response="200", * description="Returned when successful" * ) diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php index 182e659e6..fdba8422a 100644 --- a/src/Wallabag/ApiBundle/Controller/UserRestController.php +++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php @@ -3,18 +3,18 @@ namespace Wallabag\ApiBundle\Controller; use Craue\ConfigBundle\Util\Config; +use Doctrine\ORM\EntityManagerInterface; use FOS\UserBundle\Event\UserEvent; use FOS\UserBundle\FOSUserEvents; use FOS\UserBundle\Model\UserManagerInterface; use JMS\Serializer\SerializationContext; -use JMS\Serializer\SerializerInterface; +use Nelmio\ApiDocBundle\Annotation\Model; use Nelmio\ApiDocBundle\Annotation\Operation; -use Swagger\Annotations as SWG; +use OpenApi\Annotations as OA; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; -use Symfony\Component\Translation\TranslatorInterface; use Wallabag\ApiBundle\Entity\Client; use Wallabag\UserBundle\Entity\User; use Wallabag\UserBundle\Form\NewUserType; @@ -27,9 +27,10 @@ class UserRestController extends WallabagRestController * @Operation( * tags={"User"}, * summary="Retrieve current logged in user informations.", - * @SWG\Response( + * @OA\Response( * response="200", - * description="Returned when successful" + * description="Returned when successful", + * @Model(type=User::class, groups={"user_api"})) * ) * ) * @@ -50,37 +51,48 @@ class UserRestController extends WallabagRestController * @Operation( * tags={"User"}, * summary="Register an user and create a client.", - * @SWG\Parameter( - * name="username", - * in="body", - * description="The user's username", - * required=true, - * @SWG\Schema(type="string") + * @OA\RequestBody( + * @OA\JsonContent( + * type="object", + * required={"username", "password", "email"}, + * @OA\Property( + * property="username", + * description="The user's username", + * type="string", + * example="wallabag", + * ), + * @OA\Property( + * property="password", + * description="The user's password", + * type="string", + * example="hidden_value", + * ), + * @OA\Property( + * property="email", + * description="The user's email", + * type="string", + * example="wallabag@wallabag.io", + * ), + * @OA\Property( + * property="client_name", + * description="The client name (to be used by your app)", + * type="string", + * example="Fancy App", + * ), + * ) * ), - * @SWG\Parameter( - * name="password", - * in="body", - * description="The user's password", - * required=true, - * @SWG\Schema(type="string") + * @OA\Response( + * response="201", + * description="Returned when successful", + * @Model(type=User::class, groups={"user_api_with_client"})), * ), - * @SWG\Parameter( - * name="email", - * in="body", - * description="The user's email", - * required=true, - * @SWG\Schema(type="string") + * @OA\Response( + * response="403", + * description="Server doesn't allow registrations" * ), - * @SWG\Parameter( - * name="client_name", - * in="body", - * description="The client name (to be used by your app)", - * required=true, - * @SWG\Schema(type="string") - * ), - * @SWG\Response( - * response="200", - * description="Returned when successful" + * @OA\Response( + * response="400", + * description="Request is incorrectly formatted" * ) * ) * @@ -90,17 +102,16 @@ class UserRestController extends WallabagRestController * * @return JsonResponse */ - public function putUserAction(Request $request) + public function putUserAction(Request $request, Config $craueConfig, UserManagerInterface $userManager, EntityManagerInterface $entityManager, EventDispatcherInterface $eventDispatcher) { - if (!$this->container->getParameter('fosuser_registration') || !$this->get(Config::class)->get('api_user_registration')) { - $json = $this->get(SerializerInterface::class)->serialize(['error' => "Server doesn't allow registrations"], 'json'); + if (!$this->getParameter('fosuser_registration') || !$craueConfig->get('api_user_registration')) { + $json = $this->serializer->serialize(['error' => "Server doesn't allow registrations"], 'json'); return (new JsonResponse()) ->setJson($json) ->setStatusCode(JsonResponse::HTTP_FORBIDDEN); } - $userManager = $this->get(UserManagerInterface::class); $user = $userManager->createUser(); \assert($user instanceof User); // user will be disabled BY DEFAULT to avoid spamming account to be enabled @@ -140,7 +151,7 @@ class UserRestController extends WallabagRestController $errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']); } - $json = $this->get(SerializerInterface::class)->serialize(['error' => $errors], 'json'); + $json = $this->serializer->serialize(['error' => $errors], 'json'); return (new JsonResponse()) ->setJson($json) @@ -151,15 +162,14 @@ class UserRestController extends WallabagRestController $client = new Client($user); $client->setName($request->request->get('client_name', 'Default client')); - $this->get('doctrine')->getManager()->persist($client); + $entityManager->persist($client); $user->addClient($client); $userManager->updateUser($user); // dispatch a created event so the associated config will be created - $event = new UserEvent($user, $request); - $this->get(EventDispatcherInterface::class)->dispatch(FOSUserEvents::USER_CREATED, $event); + $eventDispatcher->dispatch(new UserEvent($user, $request), FOSUserEvents::USER_CREATED); return $this->sendUser($user, 'user_api_with_client', JsonResponse::HTTP_CREATED); } @@ -174,7 +184,7 @@ class UserRestController extends WallabagRestController */ private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK) { - $json = $this->get(SerializerInterface::class)->serialize( + $json = $this->serializer->serialize( $user, 'json', SerializationContext::create()->setGroups([$group]) @@ -196,7 +206,7 @@ class UserRestController extends WallabagRestController { $translatedErrors = []; foreach ($errors as $error) { - $translatedErrors[] = $this->get(TranslatorInterface::class)->trans($error); + $translatedErrors[] = $this->translator->trans($error); } return $translatedErrors; diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 4716addd6..b2f5f30f7 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -2,29 +2,54 @@ namespace Wallabag\ApiBundle\Controller; +use Craue\ConfigBundle\Util\Config; +use Doctrine\ORM\EntityManagerInterface; use FOS\RestBundle\Controller\AbstractFOSRestController; use JMS\Serializer\SerializationContext; use JMS\Serializer\SerializerInterface; +use Nelmio\ApiDocBundle\Annotation\Model; use Nelmio\ApiDocBundle\Annotation\Operation; -use Swagger\Annotations as SWG; +use OpenApi\Annotations as OA; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Contracts\Translation\TranslatorInterface; +use Wallabag\ApiBundle\Entity\ApplicationInfo; use Wallabag\UserBundle\Entity\User; class WallabagRestController extends AbstractFOSRestController { + protected EntityManagerInterface $entityManager; + protected SerializerInterface $serializer; + protected AuthorizationCheckerInterface $authorizationChecker; + protected TokenStorageInterface $tokenStorage; + protected TranslatorInterface $translator; + + public function __construct(EntityManagerInterface $entityManager, SerializerInterface $serializer, AuthorizationCheckerInterface $authorizationChecker, TokenStorageInterface $tokenStorage, TranslatorInterface $translator) + { + $this->entityManager = $entityManager; + $this->serializer = $serializer; + $this->authorizationChecker = $authorizationChecker; + $this->tokenStorage = $tokenStorage; + $this->translator = $translator; + } + /** * Retrieve version number. * * @Operation( - * tags={"Informations"}, + * tags={"Information"}, * summary="Retrieve version number.", - * @SWG\Response( + * @OA\Response( * response="200", - * description="Returned when successful" + * description="Returned when successful", + * @OA\JsonContent( + * description="Version number of the application.", + * type="string", + * example="2.5.2", + * ) * ) * ) * @@ -36,21 +61,20 @@ class WallabagRestController extends AbstractFOSRestController */ public function getVersionAction() { - $version = $this->container->getParameter('wallabag_core.version'); - $json = $this->get(SerializerInterface::class)->serialize($version, 'json'); + $version = $this->getParameter('wallabag_core.version'); + $json = $this->serializer->serialize($version, 'json'); return (new JsonResponse())->setJson($json); } /** - * Retrieve information about the wallabag instance. - * * @Operation( - * tags={"Informations"}, - * summary="Retrieve information about the wallabag instance.", - * @SWG\Response( + * tags={"Information"}, + * summary="Retrieve information about the running wallabag application.", + * @OA\Response( * response="200", - * description="Returned when successful" + * description="Returned when successful", + * @Model(type=ApplicationInfo::class), * ) * ) * @@ -58,20 +82,19 @@ class WallabagRestController extends AbstractFOSRestController * * @return JsonResponse */ - public function getInfoAction() + public function getInfoAction(Config $craueConfig) { - $info = [ - 'appname' => 'wallabag', - 'version' => $this->container->getParameter('wallabag_core.version'), - 'allowed_registration' => $this->container->getParameter('fosuser_registration'), - ]; + $info = new ApplicationInfo( + $this->getParameter('wallabag_core.version'), + $this->getParameter('fosuser_registration') && $craueConfig->get('api_user_registration'), + ); - return (new JsonResponse())->setJson($this->get(SerializerInterface::class)->serialize($info, 'json')); + return (new JsonResponse())->setJson($this->serializer->serialize($info, 'json')); } protected function validateAuthentication() { - if (false === $this->get(AuthorizationCheckerInterface::class)->isGranted('IS_AUTHENTICATED_FULLY')) { + if (false === $this->authorizationChecker->isGranted('IS_AUTHENTICATED_FULLY')) { throw new AccessDeniedException(); } } @@ -84,8 +107,9 @@ class WallabagRestController extends AbstractFOSRestController */ protected function validateUserAccess($requestUserId) { - $user = $this->get(TokenStorageInterface::class)->getToken()->getUser(); + $user = $this->tokenStorage->getToken()->getUser(); \assert($user instanceof User); + if ($requestUserId !== $user->getId()) { throw $this->createAccessDeniedException('Access forbidden. Entry user id: ' . $requestUserId . ', logged user id: ' . $user->getId()); } @@ -104,7 +128,7 @@ class WallabagRestController extends AbstractFOSRestController $context = new SerializationContext(); $context->setSerializeNull(true); - $json = $this->get(SerializerInterface::class)->serialize($data, 'json', $context); + $json = $this->serializer->serialize($data, 'json', $context); return (new JsonResponse())->setJson($json); } diff --git a/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php b/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php index f70a58358..276374018 100644 --- a/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php @@ -17,9 +17,6 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('wallabag_api'); - - return $treeBuilder; + return new TreeBuilder('wallabag_api'); } } diff --git a/src/Wallabag/ApiBundle/Entity/ApplicationInfo.php b/src/Wallabag/ApiBundle/Entity/ApplicationInfo.php new file mode 100644 index 000000000..decb3829c --- /dev/null +++ b/src/Wallabag/ApiBundle/Entity/ApplicationInfo.php @@ -0,0 +1,44 @@ +appname = 'wallabag'; + $this->version = $version; + $this->allowed_registration = $allowed_registration; + } +} diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index 78349820a..6760864e8 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php @@ -7,6 +7,7 @@ use FOS\OAuthServerBundle\Entity\Client as BaseClient; use JMS\Serializer\Annotation\Groups; use JMS\Serializer\Annotation\SerializedName; use JMS\Serializer\Annotation\VirtualProperty; +use OpenApi\Annotations as OA; use Wallabag\UserBundle\Entity\User; /** @@ -27,6 +28,12 @@ class Client extends BaseClient * * @ORM\Column(name="name", type="text", nullable=false) * + * @OA\Property( + * description="Name of the API client", + * type="string", + * example="Default Client", + * ) + * * @Groups({"user_api_with_client"}) */ protected $name; @@ -44,6 +51,12 @@ class Client extends BaseClient /** * @var string * + * @OA\Property( + * description="Client secret used for authorization", + * type="string", + * example="2lmubx2m9vy80ss8c4wwcsg8ok44s88ocwcc8wo0w884oc8440", + * ) + * * @SerializedName("client_secret") * @Groups({"user_api_with_client"}) */ @@ -94,6 +107,13 @@ class Client extends BaseClient /** * @VirtualProperty + * + * @OA\Property( + * description="Client secret used for authorization", + * type="string", + * example="3_1lpybsn0od40css4w4ko8gsc8cwwskggs8kgg448ko0owo4c84", + * ) + * * @SerializedName("client_id") * @Groups({"user_api_with_client"}) */ diff --git a/src/Wallabag/CoreBundle/Command/CleanDownloadedImagesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDownloadedImagesCommand.php index 90af26cb0..fe4f77a70 100644 --- a/src/Wallabag/CoreBundle/Command/CleanDownloadedImagesCommand.php +++ b/src/Wallabag/CoreBundle/Command/CleanDownloadedImagesCommand.php @@ -2,7 +2,7 @@ namespace Wallabag\CoreBundle\Command; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -11,8 +11,19 @@ use Symfony\Component\Finder\Finder; use Wallabag\CoreBundle\Helper\DownloadImages; use Wallabag\CoreBundle\Repository\EntryRepository; -class CleanDownloadedImagesCommand extends ContainerAwareCommand +class CleanDownloadedImagesCommand extends Command { + private EntryRepository $entryRepository; + private DownloadImages $downloadImages; + + public function __construct(EntryRepository $entryRepository, DownloadImages $downloadImages) + { + $this->entryRepository = $entryRepository; + $this->downloadImages = $downloadImages; + + parent::__construct(); + } + protected function configure() { $this @@ -36,8 +47,7 @@ class CleanDownloadedImagesCommand extends ContainerAwareCommand $io->text('Dry run mode enabled (no images will be removed)'); } - $downloadImages = $this->getContainer()->get(DownloadImages::class); - $baseFolder = $downloadImages->getBaseFolder(); + $baseFolder = $this->downloadImages->getBaseFolder(); $io->text('Retrieve existing images'); @@ -58,12 +68,12 @@ class CleanDownloadedImagesCommand extends ContainerAwareCommand $io->text('Retrieve valid folders attached to a user'); - $entries = $this->getContainer()->get(EntryRepository::class)->findAllEntriesIdByUserId(); + $entries = $this->entryRepository->findAllEntriesIdByUserId(); // retrieve _valid_ folders from existing entries $validPaths = []; foreach ($entries as $entry) { - $path = $downloadImages->getRelativePath($entry['id']); + $path = $this->downloadImages->getRelativePath($entry['id']); if (!file_exists($baseFolder . '/' . $path)) { continue; diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php index 5af642dd8..045828235 100644 --- a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php +++ b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php @@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Command; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NoResultException; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -14,12 +14,22 @@ use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\UserBundle\Entity\User; use Wallabag\UserBundle\Repository\UserRepository; -class CleanDuplicatesCommand extends ContainerAwareCommand +class CleanDuplicatesCommand extends Command { - /** @var SymfonyStyle */ - protected $io; + protected SymfonyStyle $io; + protected int $duplicates = 0; + private EntityManagerInterface $entityManager; + private EntryRepository $entryRepository; + private UserRepository $userRepository; - protected $duplicates = 0; + public function __construct(EntityManagerInterface $entityManager, EntryRepository $entryRepository, UserRepository $userRepository) + { + $this->entityManager = $entityManager; + $this->entryRepository = $entryRepository; + $this->userRepository = $userRepository; + + parent::__construct(); + } protected function configure() { @@ -52,7 +62,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand $this->io->success('Finished cleaning.'); } else { - $users = $this->getContainer()->get(UserRepository::class)->findAll(); + $users = $this->userRepository->findAll(); $this->io->text(sprintf('Cleaning through %d user accounts', \count($users))); @@ -68,10 +78,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand private function cleanDuplicates(User $user) { - $em = $this->getContainer()->get(EntityManagerInterface::class); - $repo = $this->getContainer()->get(EntryRepository::class); - - $entries = $repo->findAllEntriesIdAndUrlByUserId($user->getId()); + $entries = $this->entryRepository->findAllEntriesIdAndUrlByUserId($user->getId()); $duplicatesCount = 0; $urls = []; @@ -82,8 +89,8 @@ class CleanDuplicatesCommand extends ContainerAwareCommand if (\in_array($url, $urls, true)) { ++$duplicatesCount; - $em->remove($repo->find($entry['id'])); - $em->flush(); // Flushing at the end of the loop would require the instance not being online + $this->entityManager->remove($this->entryRepository->find($entry['id'])); + $this->entityManager->flush(); // Flushing at the end of the loop would require the instance not being online } else { $urls[] = $entry['url']; } @@ -112,6 +119,6 @@ class CleanDuplicatesCommand extends ContainerAwareCommand */ private function getUser($username) { - return $this->getContainer()->get(UserRepository::class)->findOneByUserName($username); + return $this->userRepository->findOneByUserName($username); } } diff --git a/src/Wallabag/CoreBundle/Command/ExportCommand.php b/src/Wallabag/CoreBundle/Command/ExportCommand.php index a24a7ce2e..a11892ecd 100644 --- a/src/Wallabag/CoreBundle/Command/ExportCommand.php +++ b/src/Wallabag/CoreBundle/Command/ExportCommand.php @@ -3,7 +3,7 @@ namespace Wallabag\CoreBundle\Command; use Doctrine\ORM\NoResultException; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -12,8 +12,23 @@ use Wallabag\CoreBundle\Helper\EntriesExport; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\UserBundle\Repository\UserRepository; -class ExportCommand extends ContainerAwareCommand +class ExportCommand extends Command { + private EntryRepository $entryRepository; + private UserRepository $userRepository; + private EntriesExport $entriesExport; + private string $projectDir; + + public function __construct(EntryRepository $entryRepository, UserRepository $userRepository, EntriesExport $entriesExport, string $projectDir) + { + $this->entryRepository = $entryRepository; + $this->userRepository = $userRepository; + $this->entriesExport = $entriesExport; + $this->projectDir = $projectDir; + + parent::__construct(); + } + protected function configure() { $this @@ -38,14 +53,14 @@ class ExportCommand extends ContainerAwareCommand $io = new SymfonyStyle($input, $output); try { - $user = $this->getContainer()->get(UserRepository::class)->findOneByUserName($input->getArgument('username')); + $user = $this->userRepository->findOneByUserName($input->getArgument('username')); } catch (NoResultException $e) { $io->error(sprintf('User "%s" not found.', $input->getArgument('username'))); return 1; } - $entries = $this->getContainer()->get(EntryRepository::class) + $entries = $this->entryRepository ->getBuilderForAllByUser($user->getId()) ->getQuery() ->getResult(); @@ -55,11 +70,11 @@ class ExportCommand extends ContainerAwareCommand $filePath = $input->getArgument('filepath'); if (!$filePath) { - $filePath = $this->getContainer()->getParameter('kernel.project_dir') . '/' . sprintf('%s-export.json', $user->getUsername()); + $filePath = $this->projectDir . '/' . sprintf('%s-export.json', $user->getUsername()); } try { - $data = $this->getContainer()->get(EntriesExport::class) + $data = $this->entriesExport ->setEntries($entries) ->updateTitle('All') ->updateAuthor('All') diff --git a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php index 4637b4126..c5980d3fd 100644 --- a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php +++ b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php @@ -4,19 +4,30 @@ namespace Wallabag\CoreBundle\Command; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NoResultException; -use Doctrine\Persistence\ManagerRegistry; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Helper\UrlHasher; +use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\UserBundle\Entity\User; +use Wallabag\UserBundle\Repository\UserRepository; -class GenerateUrlHashesCommand extends ContainerAwareCommand +class GenerateUrlHashesCommand extends Command { - /** @var OutputInterface */ - protected $output; + protected OutputInterface $output; + private EntityManagerInterface $entityManager; + private EntryRepository $entryRepository; + private UserRepository $userRepository; + + public function __construct(EntityManagerInterface $entityManager, EntryRepository $entryRepository, UserRepository $userRepository) + { + $this->entityManager = $entityManager; + $this->entryRepository = $entryRepository; + $this->userRepository = $userRepository; + + parent::__construct(); + } protected function configure() { @@ -43,7 +54,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand return 1; } } else { - $users = $this->getContainer()->get('doctrine')->getRepository(User::class)->findAll(); + $users = $this->userRepository->findAll(); $output->writeln(sprintf('Generating hashed urls for "%d" users', \count($users))); @@ -59,23 +70,20 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand private function generateHashedUrls(User $user) { - $em = $this->getContainer()->get(EntityManagerInterface::class); - $repo = $this->getContainer()->get('doctrine')->getRepository(Entry::class); - - $entries = $repo->findByEmptyHashedUrlAndUserId($user->getId()); + $entries = $this->entryRepository->findByEmptyHashedUrlAndUserId($user->getId()); $i = 1; foreach ($entries as $entry) { $entry->setHashedUrl(UrlHasher::hashUrl($entry->getUrl())); - $em->persist($entry); + $this->entityManager->persist($entry); if (0 === ($i % 20)) { - $em->flush(); + $this->entityManager->flush(); } ++$i; } - $em->flush(); + $this->entityManager->flush(); $this->output->writeln(sprintf('Generated hashed urls for user: %s', $user->getUserName())); } @@ -89,11 +97,6 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand */ private function getUser($username) { - return $this->getContainer()->get('doctrine')->getRepository(User::class)->findOneByUserName($username); - } - - private function getDoctrine() - { - return $this->getContainer()->get(ManagerRegistry::class); + return $this->userRepository->findOneByUserName($username); } } diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index bc3e61d14..64ea1c229 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -5,11 +5,10 @@ namespace Wallabag\CoreBundle\Command; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception\DriverException; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\Persistence\ManagerRegistry; use FOS\UserBundle\Event\UserEvent; use FOS\UserBundle\FOSUserEvents; use FOS\UserBundle\Model\UserManagerInterface; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -22,28 +21,37 @@ use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule; use Wallabag\CoreBundle\Entity\InternalSetting; use Wallabag\UserBundle\Entity\User; -class InstallCommand extends ContainerAwareCommand +class InstallCommand extends Command { - /** - * @var InputInterface - */ - private $defaultInput; - - /** - * @var SymfonyStyle - */ - private $io; - - /** - * @var array - */ - private $functionExists = [ + private InputInterface $defaultInput; + private SymfonyStyle $io; + private array $functionExists = [ 'curl_exec', 'curl_multi_init', ]; - private bool $runOtherCommands = true; + private EntityManagerInterface $entityManager; + private EventDispatcherInterface $dispatcher; + private UserManagerInterface $userManager; + private string $databaseDriver; + private string $databaseName; + private array $defaultSettings; + private array $defaultIgnoreOriginInstanceRules; + + public function __construct(EntityManagerInterface $entityManager, EventDispatcherInterface $dispatcher, UserManagerInterface $userManager, string $databaseDriver, string $databaseName, array $defaultSettings, array $defaultIgnoreOriginInstanceRules) + { + $this->entityManager = $entityManager; + $this->dispatcher = $dispatcher; + $this->userManager = $userManager; + $this->databaseDriver = $databaseDriver; + $this->databaseName = $databaseName; + $this->defaultSettings = $defaultSettings; + $this->defaultIgnoreOriginInstanceRules = $defaultIgnoreOriginInstanceRules; + + parent::__construct(); + } + public function disableRunOtherCommands(): void { $this->runOtherCommands = false; @@ -88,8 +96,6 @@ class InstallCommand extends ContainerAwareCommand { $this->io->section('Step 1 of 4: Checking system requirements.'); - $doctrineManager = $this->getContainer()->get(ManagerRegistry::class)->getManager(); - $rows = []; // testing if database driver exists @@ -98,26 +104,26 @@ class InstallCommand extends ContainerAwareCommand $status = 'OK!'; $help = ''; - if (!\extension_loaded($this->getContainer()->getParameter('database_driver'))) { + if (!\extension_loaded($this->databaseDriver)) { $fulfilled = false; $status = 'ERROR!'; - $help = 'Database driver "' . $this->getContainer()->getParameter('database_driver') . '" is not installed.'; + $help = 'Database driver "' . $this->databaseDriver . '" is not installed.'; } - $rows[] = [sprintf($label, $this->getContainer()->getParameter('database_driver')), $status, $help]; + $rows[] = [sprintf($label, $this->databaseDriver), $status, $help]; // testing if connection to the database can be etablished $label = 'Database connection'; $status = 'OK!'; $help = ''; - $conn = $this->getContainer()->get(ManagerRegistry::class)->getManager()->getConnection(); + $conn = $this->entityManager->getConnection(); try { $conn->connect(); } catch (\Exception $e) { if (false === strpos($e->getMessage(), 'Unknown database') - && false === strpos($e->getMessage(), 'database "' . $this->getContainer()->getParameter('database_name') . '" does not exist')) { + && false === strpos($e->getMessage(), 'database "' . $this->databaseName . '" does not exist')) { $fulfilled = false; $status = 'ERROR!'; $help = 'Can\'t connect to the database: ' . $e->getMessage(); @@ -133,7 +139,7 @@ class InstallCommand extends ContainerAwareCommand // now check if MySQL isn't too old to handle utf8mb4 if ($conn->isConnected() && 'mysql' === $conn->getDatabasePlatform()->getName()) { - $version = $conn->query('select version()')->fetchColumn(); + $version = $conn->query('select version()')->fetchOne(); $minimalVersion = '5.5.4'; if (false === version_compare($version, $minimalVersion, '>')) { @@ -146,7 +152,7 @@ class InstallCommand extends ContainerAwareCommand // testing if PostgreSQL > 9.1 if ($conn->isConnected() && 'postgresql' === $conn->getDatabasePlatform()->getName()) { // return version should be like "PostgreSQL 9.5.4 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 8.0.0 (clang-800.0.38), 64-bit" - $version = $doctrineManager->getConnection()->query('SELECT version();')->fetchColumn(); + $version = $conn->query('SELECT version();')->fetchOne(); preg_match('/PostgreSQL ([0-9\.]+)/i', $version, $matches); @@ -260,10 +266,7 @@ class InstallCommand extends ContainerAwareCommand return $this; } - $em = $this->getContainer()->get(EntityManagerInterface::class); - - $userManager = $this->getContainer()->get(UserManagerInterface::class); - $user = $userManager->createUser(); + $user = $this->userManager->createUser(); \assert($user instanceof User); $user->setUsername($this->io->ask('Username', 'wallabag')); @@ -277,11 +280,10 @@ class InstallCommand extends ContainerAwareCommand $user->setEnabled(true); $user->addRole('ROLE_SUPER_ADMIN'); - $em->persist($user); + $this->entityManager->persist($user); // dispatch a created event so the associated config will be created - $event = new UserEvent($user); - $this->getContainer()->get(EventDispatcherInterface::class)->dispatch(FOSUserEvents::USER_CREATED, $event); + $this->dispatcher->dispatch(new UserEvent($user), FOSUserEvents::USER_CREATED); $this->io->text('Administration successfully setup.'); @@ -291,27 +293,28 @@ class InstallCommand extends ContainerAwareCommand private function setupConfig() { $this->io->section('Step 4 of 4: Config setup.'); - $em = $this->getContainer()->get(EntityManagerInterface::class); // cleanup before insert new stuff - $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\InternalSetting')->execute(); - $em->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule')->execute(); + $this->entityManager->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\InternalSetting')->execute(); + $this->entityManager->createQuery('DELETE FROM Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule')->execute(); - foreach ($this->getContainer()->getParameter('wallabag_core.default_internal_settings') as $setting) { + foreach ($this->defaultSettings as $setting) { $newSetting = new InternalSetting(); $newSetting->setName($setting['name']); $newSetting->setValue($setting['value']); $newSetting->setSection($setting['section']); - $em->persist($newSetting); + + $this->entityManager->persist($newSetting); } - foreach ($this->getContainer()->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $ignore_origin_instance_rule) { + foreach ($this->defaultIgnoreOriginInstanceRules as $ignore_origin_instance_rule) { $newIgnoreOriginInstanceRule = new IgnoreOriginInstanceRule(); $newIgnoreOriginInstanceRule->setRule($ignore_origin_instance_rule['rule']); - $em->persist($newIgnoreOriginInstanceRule); + + $this->entityManager->persist($newIgnoreOriginInstanceRule); } - $em->flush(); + $this->entityManager->flush(); $this->io->text('Config successfully setup.'); @@ -350,7 +353,7 @@ class InstallCommand extends ContainerAwareCommand // PDO does not always close the connection after Doctrine commands. // See https://github.com/symfony/symfony/issues/11750. - $this->getContainer()->get(ManagerRegistry::class)->getManager()->getConnection()->close(); + $this->entityManager->getConnection()->close(); if (0 !== $exitCode) { $this->getApplication()->setAutoExit(true); @@ -368,7 +371,7 @@ class InstallCommand extends ContainerAwareCommand */ private function isDatabasePresent() { - $connection = $this->getContainer()->get(ManagerRegistry::class)->getManager()->getConnection(); + $connection = $this->entityManager->getConnection(); $databaseName = $connection->getDatabase(); try { @@ -389,7 +392,7 @@ class InstallCommand extends ContainerAwareCommand // custom verification for sqlite, since `getListDatabasesSQL` doesn't work for sqlite if ('sqlite' === $schemaManager->getDatabasePlatform()->getName()) { - $params = $this->getContainer()->get(Connection::class)->getParams(); + $params = $connection->getParams(); if (isset($params['path']) && file_exists($params['path'])) { return true; @@ -415,7 +418,7 @@ class InstallCommand extends ContainerAwareCommand */ private function isSchemaPresent() { - $schemaManager = $this->getContainer()->get(ManagerRegistry::class)->getManager()->getConnection()->getSchemaManager(); + $schemaManager = $this->entityManager->getConnection()->getSchemaManager(); return \count($schemaManager->listTableNames()) > 0 ? true : false; } diff --git a/src/Wallabag/CoreBundle/Command/ListUserCommand.php b/src/Wallabag/CoreBundle/Command/ListUserCommand.php index d26fba30c..f4898c48c 100644 --- a/src/Wallabag/CoreBundle/Command/ListUserCommand.php +++ b/src/Wallabag/CoreBundle/Command/ListUserCommand.php @@ -2,7 +2,7 @@ namespace Wallabag\CoreBundle\Command; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -10,8 +10,17 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Wallabag\UserBundle\Repository\UserRepository; -class ListUserCommand extends ContainerAwareCommand +class ListUserCommand extends Command { + private UserRepository $userRepository; + + public function __construct(UserRepository $userRepository) + { + $this->userRepository = $userRepository; + + parent::__construct(); + } + protected function configure() { $this @@ -27,13 +36,13 @@ class ListUserCommand extends ContainerAwareCommand { $io = new SymfonyStyle($input, $output); - $users = $this->getContainer()->get(UserRepository::class) + $users = $this->userRepository ->getQueryBuilderForSearch($input->getArgument('search')) ->setMaxResults($input->getOption('limit')) ->getQuery() ->getResult(); - $nbUsers = $this->getContainer()->get(UserRepository::class) + $nbUsers = $this->userRepository ->getSumUsers(); $rows = []; diff --git a/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php b/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php index e02aa7218..f62a76180 100644 --- a/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php +++ b/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php @@ -2,9 +2,9 @@ namespace Wallabag\CoreBundle\Command; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NoResultException; -use Doctrine\Persistence\ManagerRegistry; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -15,8 +15,25 @@ use Wallabag\CoreBundle\Helper\ContentProxy; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\UserBundle\Repository\UserRepository; -class ReloadEntryCommand extends ContainerAwareCommand +class ReloadEntryCommand extends Command { + private EntryRepository $entryRepository; + private UserRepository $userRepository; + private EntityManagerInterface $entityManager; + private ContentProxy $contentProxy; + private EventDispatcherInterface $dispatcher; + + public function __construct(EntryRepository $entryRepository, UserRepository $userRepository, EntityManagerInterface $entityManager, ContentProxy $contentProxy, EventDispatcherInterface $dispatcher) + { + $this->entryRepository = $entryRepository; + $this->userRepository = $userRepository; + $this->entityManager = $entityManager; + $this->contentProxy = $contentProxy; + $this->dispatcher = $dispatcher; + + parent::__construct(); + } + protected function configure() { $this @@ -34,8 +51,7 @@ class ReloadEntryCommand extends ContainerAwareCommand $userId = null; if ($username = $input->getArgument('username')) { try { - $userId = $this->getContainer() - ->get(UserRepository::class) + $userId = $this->userRepository ->findOneByUserName($username) ->getId(); } catch (NoResultException $e) { @@ -45,8 +61,7 @@ class ReloadEntryCommand extends ContainerAwareCommand } } - $entryRepository = $this->getContainer()->get(EntryRepository::class); - $entryIds = $entryRepository->findAllEntriesIdByUserId($userId); + $entryIds = $this->entryRepository->findAllEntriesIdByUserId($userId); $nbEntries = \count($entryIds); if (!$nbEntries) { @@ -68,22 +83,18 @@ class ReloadEntryCommand extends ContainerAwareCommand $progressBar = $io->createProgressBar($nbEntries); - $contentProxy = $this->getContainer()->get(ContentProxy::class); - $em = $this->getContainer()->get(ManagerRegistry::class)->getManager(); - $dispatcher = $this->getContainer()->get(EventDispatcherInterface::class); - $progressBar->start(); foreach ($entryIds as $entryId) { - $entry = $entryRepository->find($entryId); + $entry = $this->entryRepository->find($entryId); - $contentProxy->updateEntry($entry, $entry->getUrl()); - $em->persist($entry); - $em->flush(); + $this->contentProxy->updateEntry($entry, $entry->getUrl()); + $this->entityManager->persist($entry); + $this->entityManager->flush(); - $dispatcher->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $this->dispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); $progressBar->advance(); - $em->detach($entry); + $this->entityManager->detach($entry); } $progressBar->finish(); diff --git a/src/Wallabag/CoreBundle/Command/ShowUserCommand.php b/src/Wallabag/CoreBundle/Command/ShowUserCommand.php index f982db734..61a882634 100644 --- a/src/Wallabag/CoreBundle/Command/ShowUserCommand.php +++ b/src/Wallabag/CoreBundle/Command/ShowUserCommand.php @@ -3,7 +3,7 @@ namespace Wallabag\CoreBundle\Command; use Doctrine\ORM\NoResultException; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -11,10 +11,17 @@ use Symfony\Component\Console\Style\SymfonyStyle; use Wallabag\UserBundle\Entity\User; use Wallabag\UserBundle\Repository\UserRepository; -class ShowUserCommand extends ContainerAwareCommand +class ShowUserCommand extends Command { - /** @var SymfonyStyle */ - protected $io; + protected SymfonyStyle $io; + private UserRepository $userRepository; + + public function __construct(UserRepository $userRepository) + { + $this->userRepository = $userRepository; + + parent::__construct(); + } protected function configure() { @@ -69,6 +76,6 @@ class ShowUserCommand extends ContainerAwareCommand */ private function getUser($username) { - return $this->getContainer()->get(UserRepository::class)->findOneByUserName($username); + return $this->userRepository->findOneByUserName($username); } } diff --git a/src/Wallabag/CoreBundle/Command/TagAllCommand.php b/src/Wallabag/CoreBundle/Command/TagAllCommand.php index 7ca7279f2..ec1b0ee67 100644 --- a/src/Wallabag/CoreBundle/Command/TagAllCommand.php +++ b/src/Wallabag/CoreBundle/Command/TagAllCommand.php @@ -2,9 +2,9 @@ namespace Wallabag\CoreBundle\Command; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NoResultException; -use Doctrine\Persistence\ManagerRegistry; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -13,8 +13,21 @@ use Wallabag\CoreBundle\Helper\RuleBasedTagger; use Wallabag\UserBundle\Entity\User; use Wallabag\UserBundle\Repository\UserRepository; -class TagAllCommand extends ContainerAwareCommand +class TagAllCommand extends Command { + private EntityManagerInterface $entityManager; + private RuleBasedTagger $ruleBasedTagger; + private UserRepository $userRepository; + + public function __construct(EntityManagerInterface $entityManager, RuleBasedTagger $ruleBasedTagger, UserRepository $userRepository) + { + $this->entityManager = $entityManager; + $this->ruleBasedTagger = $ruleBasedTagger; + $this->userRepository = $userRepository; + + parent::__construct(); + } + protected function configure() { $this @@ -39,19 +52,17 @@ class TagAllCommand extends ContainerAwareCommand return 1; } - $tagger = $this->getContainer()->get(RuleBasedTagger::class); $io->text(sprintf('Tagging entries for user %s...', $user->getUserName())); - $entries = $tagger->tagAllForUser($user); + $entries = $this->ruleBasedTagger->tagAllForUser($user); $io->text('Persist ' . \count($entries) . ' entries... '); - $em = $this->getContainer()->get('doctrine')->getManager(); foreach ($entries as $entry) { - $em->persist($entry); + $this->entityManager->persist($entry); } - $em->flush(); + $this->entityManager->flush(); $io->success('Done.'); @@ -67,11 +78,6 @@ class TagAllCommand extends ContainerAwareCommand */ private function getUser($username) { - return $this->getContainer()->get(UserRepository::class)->findOneByUserName($username); - } - - private function getDoctrine() - { - return $this->getContainer()->get(ManagerRegistry::class); + return $this->userRepository->findOneByUserName($username); } } diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index acc52ae78..8c7c25779 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php @@ -4,13 +4,13 @@ namespace Wallabag\CoreBundle\Controller; use Craue\ConfigBundle\Util\Config; use Doctrine\DBAL\Platforms\SqlitePlatform; -use Doctrine\Persistence\ManagerRegistry; +use Doctrine\ORM\EntityManagerInterface; use FOS\UserBundle\Model\UserManagerInterface; use JMS\Serializer\SerializationContext; use JMS\Serializer\SerializerBuilder; use PragmaRX\Recovery\Recovery as BackupCodes; use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; @@ -20,7 +20,7 @@ use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint; use Symfony\Component\Validator\Validator\ValidatorInterface; -use Wallabag\AnnotationBundle\Entity\Annotation; +use Wallabag\AnnotationBundle\Repository\AnnotationRepository; use Wallabag\CoreBundle\Entity\Config as ConfigEntity; use Wallabag\CoreBundle\Entity\IgnoreOriginUserRule; use Wallabag\CoreBundle\Entity\RuleInterface; @@ -32,21 +32,39 @@ use Wallabag\CoreBundle\Form\Type\IgnoreOriginUserRuleType; use Wallabag\CoreBundle\Form\Type\TaggingRuleImportType; use Wallabag\CoreBundle\Form\Type\TaggingRuleType; use Wallabag\CoreBundle\Form\Type\UserInformationType; +use Wallabag\CoreBundle\Repository\ConfigRepository; use Wallabag\CoreBundle\Repository\EntryRepository; +use Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository; +use Wallabag\CoreBundle\Repository\TaggingRuleRepository; use Wallabag\CoreBundle\Repository\TagRepository; use Wallabag\CoreBundle\Tools\Utils; use Wallabag\UserBundle\Repository\UserRepository; -class ConfigController extends Controller +class ConfigController extends AbstractController { + private EntityManagerInterface $entityManager; + private UserManagerInterface $userManager; + private EntryRepository $entryRepository; + private TagRepository $tagRepository; + private AnnotationRepository $annotationRepository; + private ConfigRepository $configRepository; + + public function __construct(EntityManagerInterface $entityManager, UserManagerInterface $userManager, EntryRepository $entryRepository, TagRepository $tagRepository, AnnotationRepository $annotationRepository, ConfigRepository $configRepository) + { + $this->entityManager = $entityManager; + $this->userManager = $userManager; + $this->entryRepository = $entryRepository; + $this->tagRepository = $tagRepository; + $this->annotationRepository = $annotationRepository; + $this->configRepository = $configRepository; + } + /** * @Route("/config", name="config") */ - public function indexAction(Request $request) + public function indexAction(Request $request, Config $craueConfig, TaggingRuleRepository $taggingRuleRepository, IgnoreOriginUserRuleRepository $ignoreOriginUserRuleRepository, UserRepository $userRepository) { - $em = $this->get('doctrine')->getManager(); $config = $this->getConfig(); - $userManager = $this->container->get(UserManagerInterface::class); $user = $this->getUser(); // handle basic config detail (this form is defined as a service) @@ -54,8 +72,8 @@ class ConfigController extends Controller $configForm->handleRequest($request); if ($configForm->isSubmitted() && $configForm->isValid()) { - $em->persist($config); - $em->flush(); + $this->entityManager->persist($config); + $this->entityManager->flush(); $request->getSession()->set('_locale', $config->getLanguage()); @@ -72,13 +90,13 @@ class ConfigController extends Controller $pwdForm->handleRequest($request); if ($pwdForm->isSubmitted() && $pwdForm->isValid()) { - if ($this->get(Config::class)->get('demo_mode_enabled') && $this->get(Config::class)->get('demo_mode_username') === $user->getUsername()) { + if ($craueConfig->get('demo_mode_enabled') && $craueConfig->get('demo_mode_username') === $user->getUsername()) { $message = 'flashes.config.notice.password_not_updated_demo'; } else { $message = 'flashes.config.notice.password_updated'; $user->setPlainPassword($pwdForm->get('new_password')->getData()); - $userManager->updateUser($user, true); + $this->userManager->updateUser($user, true); } $this->addFlash('notice', $message); @@ -94,7 +112,7 @@ class ConfigController extends Controller $userForm->handleRequest($request); if ($userForm->isSubmitted() && $userForm->isValid()) { - $userManager->updateUser($user, true); + $this->userManager->updateUser($user, true); $this->addFlash( 'notice', @@ -109,8 +127,8 @@ class ConfigController extends Controller $feedForm->handleRequest($request); if ($feedForm->isSubmitted() && $feedForm->isValid()) { - $em->persist($config); - $em->flush(); + $this->entityManager->persist($config); + $this->entityManager->flush(); $this->addFlash( 'notice', @@ -125,9 +143,7 @@ class ConfigController extends Controller $action = $this->generateUrl('config') . '#set5'; if ($request->query->has('tagging-rule')) { - $taggingRule = $this->get('doctrine') - ->getRepository(TaggingRule::class) - ->find($request->query->get('tagging-rule')); + $taggingRule = $taggingRuleRepository->find($request->query->get('tagging-rule')); if ($this->getUser()->getId() !== $taggingRule->getConfig()->getUser()->getId()) { return $this->redirect($action); @@ -141,8 +157,8 @@ class ConfigController extends Controller if ($newTaggingRule->isSubmitted() && $newTaggingRule->isValid()) { $taggingRule->setConfig($config); - $em->persist($taggingRule); - $em->flush(); + $this->entityManager->persist($taggingRule); + $this->entityManager->flush(); $this->addFlash( 'notice', @@ -169,10 +185,10 @@ class ConfigController extends Controller $taggingRule->setRule($rule['rule']); $taggingRule->setTags($rule['tags']); $taggingRule->setConfig($config); - $em->persist($taggingRule); + $this->entityManager->persist($taggingRule); } - $em->flush(); + $this->entityManager->flush(); $message = 'flashes.config.notice.tagging_rules_imported'; } @@ -188,8 +204,7 @@ class ConfigController extends Controller $action = $this->generateUrl('config') . '#set6'; if ($request->query->has('ignore-origin-user-rule')) { - $ignoreOriginUserRule = $this->get('doctrine') - ->getRepository(IgnoreOriginUserRule::class) + $ignoreOriginUserRule = $ignoreOriginUserRuleRepository ->find($request->query->get('ignore-origin-user-rule')); if ($this->getUser()->getId() !== $ignoreOriginUserRule->getConfig()->getUser()->getId()) { @@ -206,8 +221,8 @@ class ConfigController extends Controller if ($newIgnoreOriginUserRule->isSubmitted() && $newIgnoreOriginUserRule->isValid()) { $ignoreOriginUserRule->setConfig($config); - $em->persist($ignoreOriginUserRule); - $em->flush(); + $this->entityManager->persist($ignoreOriginUserRule); + $this->entityManager->flush(); $this->addFlash( 'notice', @@ -231,9 +246,8 @@ class ConfigController extends Controller 'username' => $user->getUsername(), 'token' => $config->getFeedToken(), ], - 'twofactor_auth' => $this->getParameter('twofactor_auth'), 'wallabag_url' => $this->getParameter('domain_name'), - 'enabled_users' => $this->get(UserRepository::class)->getSumEnabledUsers(), + 'enabled_users' => $userRepository->getSumEnabledUsers(), ]); } @@ -244,14 +258,10 @@ class ConfigController extends Controller */ public function disableOtpEmailAction() { - if (!$this->getParameter('twofactor_auth')) { - return $this->createNotFoundException('two_factor not enabled'); - } - $user = $this->getUser(); $user->setEmailTwoFactor(false); - $this->container->get(UserManagerInterface::class)->updateUser($user, true); + $this->userManager->updateUser($user, true); $this->addFlash( 'notice', @@ -268,17 +278,13 @@ class ConfigController extends Controller */ public function otpEmailAction() { - if (!$this->getParameter('twofactor_auth')) { - return $this->createNotFoundException('two_factor not enabled'); - } - $user = $this->getUser(); $user->setGoogleAuthenticatorSecret(null); $user->setBackupCodes(null); $user->setEmailTwoFactor(true); - $this->container->get(UserManagerInterface::class)->updateUser($user, true); + $this->userManager->updateUser($user, true); $this->addFlash( 'notice', @@ -295,16 +301,12 @@ class ConfigController extends Controller */ public function disableOtpAppAction() { - if (!$this->getParameter('twofactor_auth')) { - return $this->createNotFoundException('two_factor not enabled'); - } - $user = $this->getUser(); $user->setGoogleAuthenticatorSecret(''); $user->setBackupCodes(null); - $this->container->get(UserManagerInterface::class)->updateUser($user, true); + $this->userManager->updateUser($user, true); $this->addFlash( 'notice', @@ -319,14 +321,10 @@ class ConfigController extends Controller * * @Route("/config/otp/app", name="config_otp_app") */ - public function otpAppAction() + public function otpAppAction(GoogleAuthenticatorInterface $googleAuthenticator) { - if (!$this->getParameter('twofactor_auth')) { - return $this->createNotFoundException('two_factor not enabled'); - } - $user = $this->getUser(); - $secret = $this->get(GoogleAuthenticatorInterface::class)->generateSecret(); + $secret = $googleAuthenticator->generateSecret(); $user->setGoogleAuthenticatorSecret($secret); $user->setEmailTwoFactor(false); @@ -341,7 +339,7 @@ class ConfigController extends Controller $user->setBackupCodes($backupCodesHashed); - $this->container->get(UserManagerInterface::class)->updateUser($user, true); + $this->userManager->updateUser($user, true); $this->addFlash( 'notice', @@ -350,7 +348,7 @@ class ConfigController extends Controller return $this->render('@WallabagCore/Config/otp_app.html.twig', [ 'backupCodes' => $backupCodes, - 'qr_code' => $this->get(GoogleAuthenticatorInterface::class)->getQRContent($user), + 'qr_code' => $googleAuthenticator->getQRContent($user), 'secret' => $secret, ]); } @@ -362,15 +360,11 @@ class ConfigController extends Controller */ public function otpAppCancelAction() { - if (!$this->getParameter('twofactor_auth')) { - return $this->createNotFoundException('two_factor not enabled'); - } - $user = $this->getUser(); $user->setGoogleAuthenticatorSecret(null); $user->setBackupCodes(null); - $this->container->get(UserManagerInterface::class)->updateUser($user, true); + $this->userManager->updateUser($user, true); return $this->redirect($this->generateUrl('config') . '#set3'); } @@ -380,9 +374,9 @@ class ConfigController extends Controller * * @Route("/config/otp/app/check", name="config_otp_app_check") */ - public function otpAppCheckAction(Request $request) + public function otpAppCheckAction(Request $request, GoogleAuthenticatorInterface $googleAuthenticator) { - $isValid = $this->get(GoogleAuthenticatorInterface::class)->checkCode( + $isValid = $googleAuthenticator->checkCode( $this->getUser(), $request->get('_auth_code') ); @@ -414,9 +408,8 @@ class ConfigController extends Controller $config = $this->getConfig(); $config->setFeedToken(Utils::generateToken()); - $em = $this->get('doctrine')->getManager(); - $em->persist($config); - $em->flush(); + $this->entityManager->persist($config); + $this->entityManager->flush(); if ($request->isXmlHttpRequest()) { return new JsonResponse(['token' => $config->getFeedToken()]); @@ -440,9 +433,8 @@ class ConfigController extends Controller $config = $this->getConfig(); $config->setFeedToken(null); - $em = $this->get('doctrine')->getManager(); - $em->persist($config); - $em->flush(); + $this->entityManager->persist($config); + $this->entityManager->flush(); if ($request->isXmlHttpRequest()) { return new JsonResponse(); @@ -467,9 +459,8 @@ class ConfigController extends Controller { $this->validateRuleAction($rule); - $em = $this->get('doctrine')->getManager(); - $em->remove($rule); - $em->flush(); + $this->entityManager->remove($rule); + $this->entityManager->flush(); $this->addFlash( 'notice', @@ -504,9 +495,8 @@ class ConfigController extends Controller { $this->validateRuleAction($rule); - $em = $this->get('doctrine')->getManager(); - $em->remove($rule); - $em->flush(); + $this->entityManager->remove($rule); + $this->entityManager->flush(); $this->addFlash( 'notice', @@ -537,13 +527,11 @@ class ConfigController extends Controller * * @return RedirectResponse */ - public function resetAction($type) + public function resetAction(string $type, AnnotationRepository $annotationRepository, EntryRepository $entryRepository) { switch ($type) { case 'annotations': - $this->get('doctrine') - ->getRepository(Annotation::class) - ->removeAllByUserId($this->getUser()->getId()); + $annotationRepository->removeAllByUserId($this->getUser()->getId()); break; case 'tags': $this->removeAllTagsByUserId($this->getUser()->getId()); @@ -551,24 +539,24 @@ class ConfigController extends Controller case 'entries': // SQLite doesn't care about cascading remove, so we need to manually remove associated stuff // otherwise they won't be removed ... - if ($this->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof SqlitePlatform) { - $this->get('doctrine')->getRepository(Annotation::class)->removeAllByUserId($this->getUser()->getId()); + if ($this->entityManager->getConnection()->getDatabasePlatform() instanceof SqlitePlatform) { + $annotationRepository->removeAllByUserId($this->getUser()->getId()); } // manually remove tags to avoid orphan tag $this->removeAllTagsByUserId($this->getUser()->getId()); - $this->get(EntryRepository::class)->removeAllByUserId($this->getUser()->getId()); + $entryRepository->removeAllByUserId($this->getUser()->getId()); break; case 'archived': - if ($this->get(ManagerRegistry::class)->getConnection()->getDatabasePlatform() instanceof SqlitePlatform) { + if ($this->entityManager->getConnection()->getDatabasePlatform() instanceof SqlitePlatform) { $this->removeAnnotationsForArchivedByUserId($this->getUser()->getId()); } // manually remove tags to avoid orphan tag $this->removeTagsForArchivedByUserId($this->getUser()->getId()); - $this->get(EntryRepository::class)->removeArchivedByUserId($this->getUser()->getId()); + $entryRepository->removeArchivedByUserId($this->getUser()->getId()); break; } @@ -583,16 +571,19 @@ class ConfigController extends Controller /** * Delete account for current user. * - * @Route("/account/delete", name="delete_account") + * @Route("/account/delete", name="delete_account", methods={"POST"}) * * @throws AccessDeniedHttpException * * @return RedirectResponse */ - public function deleteAccountAction(Request $request) + public function deleteAccountAction(Request $request, UserRepository $userRepository, TokenStorageInterface $tokenStorage) { - $enabledUsers = $this->get(UserRepository::class) - ->getSumEnabledUsers(); + if (!$this->isCsrfTokenValid('delete-account', $request->request->get('token'))) { + throw $this->createAccessDeniedException('Bad CSRF token.'); + } + + $enabledUsers = $userRepository->getSumEnabledUsers(); if ($enabledUsers <= 1) { throw new AccessDeniedHttpException(); @@ -601,11 +592,10 @@ class ConfigController extends Controller $user = $this->getUser(); // logout current user - $this->get(TokenStorageInterface::class)->setToken(null); + $tokenStorage->setToken(null); $request->getSession()->invalidate(); - $em = $this->get(UserManagerInterface::class); - $em->deleteUser($user); + $this->userManager->deleteUser($user); return $this->redirect($this->generateUrl('fos_user_security_login')); } @@ -622,9 +612,8 @@ class ConfigController extends Controller $user = $this->getUser(); $user->getConfig()->setListMode(!$user->getConfig()->getListMode()); - $em = $this->get('doctrine')->getManager(); - $em->persist($user); - $em->flush(); + $this->entityManager->persist($user); + $this->entityManager->flush(); return $this->redirect($request->getSession()->get('prevUrl')); } @@ -638,9 +627,9 @@ class ConfigController extends Controller * * @return RedirectResponse */ - public function setLocaleAction(Request $request, $language = null) + public function setLocaleAction(Request $request, ValidatorInterface $validator, $language = null) { - $errors = $this->get(ValidatorInterface::class)->validate($language, (new LocaleConstraint())); + $errors = $validator->validate($language, (new LocaleConstraint())); if (0 === \count($errors)) { $request->getSession()->set('_locale', $language); @@ -687,19 +676,16 @@ class ConfigController extends Controller return; } - $this->get(EntryRepository::class) - ->removeTags($userId, $tags); + $this->entryRepository->removeTags($userId, $tags); // cleanup orphan tags - $em = $this->get('doctrine')->getManager(); - foreach ($tags as $tag) { if (0 === \count($tag->getEntries())) { - $em->remove($tag); + $this->entityManager->remove($tag); } } - $em->flush(); + $this->entityManager->flush(); } /** @@ -709,7 +695,7 @@ class ConfigController extends Controller */ private function removeAllTagsByUserId($userId) { - $tags = $this->get(TagRepository::class)->findAllTags($userId); + $tags = $this->tagRepository->findAllTags($userId); $this->removeAllTagsByStatusAndUserId($tags, $userId); } @@ -720,23 +706,20 @@ class ConfigController extends Controller */ private function removeTagsForArchivedByUserId($userId) { - $tags = $this->get(TagRepository::class)->findForArchivedArticlesByUser($userId); + $tags = $this->tagRepository->findForArchivedArticlesByUser($userId); $this->removeAllTagsByStatusAndUserId($tags, $userId); } private function removeAnnotationsForArchivedByUserId($userId) { - $em = $this->get('doctrine')->getManager(); - - $archivedEntriesAnnotations = $this->get('doctrine') - ->getRepository(Annotation::class) + $archivedEntriesAnnotations = $this->annotationRepository ->findAllArchivedEntriesByUser($userId); foreach ($archivedEntriesAnnotations as $archivedEntriesAnnotation) { - $em->remove($archivedEntriesAnnotation); + $this->entityManager->remove($archivedEntriesAnnotation); } - $em->flush(); + $this->entityManager->flush(); } /** @@ -757,9 +740,7 @@ class ConfigController extends Controller */ private function getConfig() { - $config = $this->get('doctrine') - ->getRepository(ConfigEntity::class) - ->findOneByUser($this->getUser()); + $config = $this->configRepository->findOneByUser($this->getUser()); // should NEVER HAPPEN ... if (!$config) { diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 76acb531b..8491a2875 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -3,20 +3,20 @@ namespace Wallabag\CoreBundle\Controller; use Craue\ConfigBundle\Util\Config; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NoResultException; use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface; use Pagerfanta\Doctrine\ORM\QueryAdapter as DoctrineORMAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Event\EntryDeletedEvent; @@ -31,16 +31,34 @@ use Wallabag\CoreBundle\Helper\Redirect; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\CoreBundle\Repository\TagRepository; -class EntryController extends Controller +class EntryController extends AbstractController { + private EntityManagerInterface $entityManager; + private EventDispatcherInterface $eventDispatcher; + private EntryRepository $entryRepository; + private Redirect $redirectHelper; + private PreparePagerForEntries $preparePagerForEntriesHelper; + private FilterBuilderUpdaterInterface $filterBuilderUpdater; + private ContentProxy $contentProxy; + + public function __construct(EntityManagerInterface $entityManager, EventDispatcherInterface $eventDispatcher, EntryRepository $entryRepository, Redirect $redirectHelper, PreparePagerForEntries $preparePagerForEntriesHelper, FilterBuilderUpdaterInterface $filterBuilderUpdater, ContentProxy $contentProxy) + { + $this->entityManager = $entityManager; + $this->eventDispatcher = $eventDispatcher; + $this->entryRepository = $entryRepository; + $this->redirectHelper = $redirectHelper; + $this->preparePagerForEntriesHelper = $preparePagerForEntriesHelper; + $this->filterBuilderUpdater = $filterBuilderUpdater; + $this->contentProxy = $contentProxy; + } + /** * @Route("/mass", name="mass_action") * * @return Response */ - public function massAction(Request $request) + public function massAction(Request $request, TagRepository $tagRepository) { - $em = $this->get('doctrine')->getManager(); $values = $request->request->all(); $tagsToAdd = []; @@ -67,7 +85,7 @@ class EntryController extends Controller $label = substr($label, 1); $remove = true; } - $tag = $this->get(TagRepository::class)->findOneByLabel($label); + $tag = $tagRepository->findOneByLabel($label); if ($remove) { if (null !== $tag) { $tagsToRemove[] = $tag; @@ -86,7 +104,7 @@ class EntryController extends Controller if (isset($values['entry-checkbox'])) { foreach ($values['entry-checkbox'] as $id) { /** @var Entry * */ - $entry = $this->get(EntryRepository::class)->findById((int) $id)[0]; + $entry = $this->entryRepository->findById((int) $id)[0]; $this->checkUserAction($entry); @@ -102,15 +120,17 @@ class EntryController extends Controller $entry->removeTag($tag); } } elseif ('delete' === $action) { - $this->get(EventDispatcherInterface::class)->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); - $em->remove($entry); + $this->eventDispatcher->dispatch(new EntryDeletedEvent($entry), EntryDeletedEvent::NAME); + $this->entityManager->remove($entry); } } - $em->flush(); + $this->entityManager->flush(); } - return $this->redirect($this->get(Redirect::class)->to($request->getSession()->get('prevUrl'))); + $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl')); + + return $this->redirect($redirectUrl); } /** @@ -149,7 +169,7 @@ class EntryController extends Controller * * @return Response */ - public function addEntryFormAction(Request $request) + public function addEntryFormAction(Request $request, TranslatorInterface $translator) { $entry = new Entry($this->getUser()); @@ -161,9 +181,9 @@ class EntryController extends Controller $existingEntry = $this->checkIfEntryAlreadyExists($entry); if (false !== $existingEntry) { - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.entry.notice.entry_already_saved', ['%date%' => $existingEntry->getCreatedAt()->format('d-m-Y')]) + $translator->trans('flashes.entry.notice.entry_already_saved', ['%date%' => $existingEntry->getCreatedAt()->format('d-m-Y')]) ); return $this->redirect($this->generateUrl('view', ['id' => $existingEntry->getId()])); @@ -171,12 +191,11 @@ class EntryController extends Controller $this->updateEntry($entry); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $this->eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); return $this->redirect($this->generateUrl('homepage')); } @@ -199,12 +218,11 @@ class EntryController extends Controller if (false === $this->checkIfEntryAlreadyExists($entry)) { $this->updateEntry($entry); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $this->eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); } return $this->redirect($this->generateUrl('homepage')); @@ -236,11 +254,10 @@ class EntryController extends Controller $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', 'flashes.entry.notice.entry_updated' ); @@ -279,7 +296,7 @@ class EntryController extends Controller public function showUnreadAction(Request $request, $page) { // load the quickstart if no entry in database - if (1 === (int) $page && 0 === $this->get(EntryRepository::class)->countAllEntriesByUser($this->getUser()->getId())) { + if (1 === (int) $page && 0 === $this->entryRepository->countAllEntriesByUser($this->getUser()->getId())) { return $this->redirect($this->generateUrl('quickstart')); } @@ -345,21 +362,17 @@ class EntryController extends Controller /** * Shows random entry depending on the given type. * - * @param string $type - * * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|annotated|all"}) * * @return RedirectResponse */ - public function redirectRandomEntryAction($type = 'all') + public function redirectRandomEntryAction(string $type = 'all') { try { - $entry = $this->get(EntryRepository::class) + $entry = $this->entryRepository ->getRandomEntry($this->getUser()->getId(), $type); } catch (NoResultException $e) { - $bag = $this->get(SessionInterface::class)->getFlashBag(); - $bag->clear(); - $bag->add('notice', 'flashes.entry.notice.no_random_entry'); + $this->addFlash('notice', 'flashes.entry.notice.no_random_entry'); return $this->redirect($this->generateUrl($type)); } @@ -401,19 +414,16 @@ class EntryController extends Controller // if refreshing entry failed, don't save it if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { - $bag = $this->get(SessionInterface::class)->getFlashBag(); - $bag->clear(); - $bag->add('notice', 'flashes.entry.notice.entry_reloaded_failed'); + $this->addFlash('notice', 'flashes.entry.notice.entry_reloaded_failed'); return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()])); } - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); // entry saved, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry)); + $this->eventDispatcher->dispatch(new EntrySavedEvent($entry), EntrySavedEvent::NAME); return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()])); } @@ -430,19 +440,22 @@ class EntryController extends Controller $this->checkUserAction($entry); $entry->toggleArchive(); - $this->get('doctrine')->getManager()->flush(); + $this->entityManager->flush(); $message = 'flashes.entry.notice.entry_unarchived'; if ($entry->isArchived()) { $message = 'flashes.entry.notice.entry_archived'; } - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', $message ); - return $this->redirect($this->get(Redirect::class)->to($request->getSession()->get('prevUrl'))); + + $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl')); + + return $this->redirect($redirectUrl); } /** @@ -458,19 +471,21 @@ class EntryController extends Controller $entry->toggleStar(); $entry->updateStar($entry->isStarred()); - $this->get('doctrine')->getManager()->flush(); + $this->entityManager->flush(); $message = 'flashes.entry.notice.entry_unstarred'; if ($entry->isStarred()) { $message = 'flashes.entry.notice.entry_starred'; } - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', $message ); - return $this->redirect($this->get(Redirect::class)->to($request->getSession()->get('prevUrl'))); + $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl')); + + return $this->redirect($redirectUrl); } /** @@ -493,21 +508,22 @@ class EntryController extends Controller ); // entry deleted, dispatch event about it! - $this->get(EventDispatcherInterface::class)->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry)); + $this->eventDispatcher->dispatch(new EntryDeletedEvent($entry), EntryDeletedEvent::NAME); - $em = $this->get('doctrine')->getManager(); - $em->remove($entry); - $em->flush(); + $this->entityManager->remove($entry); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', 'flashes.entry.notice.entry_deleted' ); - // don't redirect user to the deleted entry - $prev = $request->getSession()->get('prevUrl'); + + // don't redirect user to the deleted entry (check that the referer doesn't end with the same url) + $prev = $request->headers->get('prevUrl'); $to = (1 !== preg_match('#' . $url . '$#i', $prev) ? $prev : null); - $redirectUrl = $this->get(Redirect::class)->to($to); + + $redirectUrl = $this->redirectHelper->to($to); return $this->redirect($redirectUrl); } @@ -526,9 +542,8 @@ class EntryController extends Controller if (null === $entry->getUid()) { $entry->generateUid(); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); } return $this->redirect($this->generateUrl('share_entry', [ @@ -549,9 +564,8 @@ class EntryController extends Controller $entry->cleanUid(); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); return $this->redirect($this->generateUrl('view', [ 'id' => $entry->getId(), @@ -566,9 +580,9 @@ class EntryController extends Controller * * @return Response */ - public function shareEntryAction(Entry $entry) + public function shareEntryAction(Entry $entry, Config $craueConfig) { - if (!$this->get(Config::class)->get('share_public')) { + if (!$craueConfig->get('share_public')) { throw $this->createAccessDeniedException('Sharing an entry is disabled for this user.'); } @@ -603,7 +617,6 @@ class EntryController extends Controller */ private function showEntries($type, Request $request, $page) { - $repository = $this->get(EntryRepository::class); $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); $request->getSession()->set('prevUrl', $request->getRequestUri()); @@ -612,31 +625,31 @@ class EntryController extends Controller switch ($type) { case 'search': - $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute); + $qb = $this->entryRepository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute); break; case 'untagged': - $qb = $repository->getBuilderForUntaggedByUser($this->getUser()->getId()); + $qb = $this->entryRepository->getBuilderForUntaggedByUser($this->getUser()->getId()); break; case 'starred': - $qb = $repository->getBuilderForStarredByUser($this->getUser()->getId()); + $qb = $this->entryRepository->getBuilderForStarredByUser($this->getUser()->getId()); $formOptions['filter_starred'] = true; break; case 'archive': - $qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId()); + $qb = $this->entryRepository->getBuilderForArchiveByUser($this->getUser()->getId()); $formOptions['filter_archived'] = true; break; case 'annotated': - $qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId()); + $qb = $this->entryRepository->getBuilderForAnnotationsByUser($this->getUser()->getId()); break; case 'unread': - $qb = $repository->getBuilderForUnreadByUser($this->getUser()->getId()); + $qb = $this->entryRepository->getBuilderForUnreadByUser($this->getUser()->getId()); $formOptions['filter_unread'] = true; break; case 'same-domain': - $qb = $repository->getBuilderForSameDomainByUser($this->getUser()->getId(), $request->get('id')); + $qb = $this->entryRepository->getBuilderForSameDomainByUser($this->getUser()->getId(), $request->get('id')); break; case 'all': - $qb = $repository->getBuilderForAllByUser($this->getUser()->getId()); + $qb = $this->entryRepository->getBuilderForAllByUser($this->getUser()->getId()); break; default: throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); @@ -649,12 +662,12 @@ class EntryController extends Controller $form->submit($request->query->get($form->getName())); // build the query from the given form object - $this->get(FilterBuilderUpdaterInterface::class)->addFilterConditions($form, $qb); + $this->filterBuilderUpdater->addFilterConditions($form, $qb); } $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); - $entries = $this->get(PreparePagerForEntries::class)->prepare($pagerAdapter); + $entries = $this->preparePagerForEntriesHelper->prepare($pagerAdapter); try { $entries->setCurrentPage($page); @@ -664,7 +677,7 @@ class EntryController extends Controller } } - $nbEntriesUntagged = $this->get(EntryRepository::class) + $nbEntriesUntagged = $this->entryRepository ->countUntaggedEntriesByUser($this->getUser()->getId()); return $this->render( @@ -690,7 +703,7 @@ class EntryController extends Controller $message = 'flashes.entry.notice.' . $prefixMessage; try { - $this->get(ContentProxy::class)->updateEntry($entry, $entry->getUrl()); + $this->contentProxy->updateEntry($entry, $entry->getUrl()); } catch (\Exception $e) { // $this->logger->error('Error while saving an entry', [ // 'exception' => $e, @@ -701,14 +714,14 @@ class EntryController extends Controller } if (empty($entry->getDomainName())) { - $this->get(ContentProxy::class)->setEntryDomainName($entry); + $this->contentProxy->setEntryDomainName($entry); } if (empty($entry->getTitle())) { - $this->get(ContentProxy::class)->setDefaultEntryTitle($entry); + $this->contentProxy->setDefaultEntryTitle($entry); } - $this->get(SessionInterface::class)->getFlashBag()->add('notice', $message); + $this->addFlash('notice', $message); } /** @@ -728,6 +741,6 @@ class EntryController extends Controller */ private function checkIfEntryAlreadyExists(Entry $entry) { - return $this->get(EntryRepository::class)->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId()); + return $this->entryRepository->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId()); } } diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php index 5b2325507..c958a382c 100644 --- a/src/Wallabag/CoreBundle/Controller/ExportController.php +++ b/src/Wallabag/CoreBundle/Controller/ExportController.php @@ -2,12 +2,11 @@ namespace Wallabag\CoreBundle\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Annotation\Route; -use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Helper\EntriesExport; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\CoreBundle\Repository\TagRepository; @@ -16,13 +15,11 @@ use Wallabag\CoreBundle\Repository\TagRepository; * The try/catch can be removed once all formats will be implemented. * Still need implementation: txt. */ -class ExportController extends Controller +class ExportController extends AbstractController { /** * Gets one entry content. * - * @param string $format - * * @Route("/export/{id}.{format}", name="export_entry", requirements={ * "format": "epub|mobi|pdf|json|xml|txt|csv", * "id": "\d+" @@ -30,10 +27,21 @@ class ExportController extends Controller * * @return Response */ - public function downloadEntryAction(Entry $entry, $format) + public function downloadEntryAction(Request $request, EntryRepository $entryRepository, EntriesExport $entriesExport, string $format, int $id) { try { - return $this->get(EntriesExport::class) + $entry = $entryRepository->find($id); + + /* + * We duplicate EntryController::checkUserAction here as a quick fix for an improper authorization vulnerability + * + * This should be eventually rewritten + */ + if (null === $entry || null === $this->getUser() || $this->getUser()->getId() !== $entry->getUser()->getId()) { + throw new NotFoundHttpException(); + } + + return $entriesExport ->setEntries($entry) ->updateTitle('entry') ->updateAuthor('entry') @@ -46,9 +54,6 @@ class ExportController extends Controller /** * Export all entries for current user. * - * @param string $format - * @param string $category - * * @Route("/export/{category}.{format}", name="export_entries", requirements={ * "format": "epub|mobi|pdf|json|xml|txt|csv", * "category": "all|unread|starred|archive|tag_entries|untagged|search|annotated|same_domain" @@ -56,17 +61,24 @@ class ExportController extends Controller * * @return Response */ - public function downloadEntriesAction(Request $request, $format, $category) + public function downloadEntriesAction(Request $request, EntryRepository $entryRepository, TagRepository $tagRepository, EntriesExport $entriesExport, string $format, string $category, int $entry = 0) { $method = ucfirst($category); $methodBuilder = 'getBuilderFor' . $method . 'ByUser'; - $repository = $this->get(EntryRepository::class); $title = $method; - if ('tag_entries' === $category) { - $tag = $this->get(TagRepository::class)->findOneBySlug($request->query->get('tag')); + if ('same_domain' === $category) { + $entries = $entryRepository->getBuilderForSameDomainByUser( + $this->getUser()->getId(), + $request->get('entry') + )->getQuery() + ->getResult(); - $entries = $repository->findAllByTagId( + $title = 'Same domain'; + } elseif ('tag_entries' === $category) { + $tag = $tagRepository->findOneBySlug($request->query->get('tag')); + + $entries = $entryRepository->findAllByTagId( $this->getUser()->getId(), $tag->getId() ); @@ -76,7 +88,7 @@ class ExportController extends Controller $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); - $entries = $repository->getBuilderForSearchByUser( + $entries = $entryRepository->getBuilderForSearchByUser( $this->getUser()->getId(), $searchTerm, $currentRoute @@ -85,21 +97,21 @@ class ExportController extends Controller $title = 'Search ' . $searchTerm; } elseif ('annotated' === $category) { - $entries = $repository->getBuilderForAnnotationsByUser( + $entries = $entryRepository->getBuilderForAnnotationsByUser( $this->getUser()->getId() )->getQuery() ->getResult(); $title = 'With annotations'; } else { - $entries = $repository + $entries = $entryRepository ->$methodBuilder($this->getUser()->getId()) ->getQuery() ->getResult(); } try { - return $this->get(EntriesExport::class) + return $entriesExport ->setEntries($entries) ->updateTitle($title) ->updateAuthor($method) diff --git a/src/Wallabag/CoreBundle/Controller/FeedController.php b/src/Wallabag/CoreBundle/Controller/FeedController.php index ee0490623..06618faff 100644 --- a/src/Wallabag/CoreBundle/Controller/FeedController.php +++ b/src/Wallabag/CoreBundle/Controller/FeedController.php @@ -7,7 +7,7 @@ use Pagerfanta\Doctrine\ORM\QueryAdapter as DoctrineORMAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Pagerfanta\Pagerfanta; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; @@ -18,8 +18,15 @@ use Wallabag\CoreBundle\Helper\PreparePagerForEntries; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\UserBundle\Entity\User; -class FeedController extends Controller +class FeedController extends AbstractController { + private EntryRepository $entryRepository; + + public function __construct(EntryRepository $entryRepository) + { + $this->entryRepository = $entryRepository; + } + /** * Shows unread entries for current user. * @@ -92,7 +99,7 @@ class FeedController extends Controller * * @return Response */ - public function showTagsFeedAction(Request $request, User $user, Tag $tag, $page) + public function showTagsFeedAction(Request $request, User $user, Tag $tag, PreparePagerForEntries $preparePagerForEntries, $page) { $sort = $request->query->get('sort', 'created'); @@ -115,7 +122,7 @@ class FeedController extends Controller UrlGeneratorInterface::ABSOLUTE_URL ); - $entriesByTag = $this->get(EntryRepository::class)->findAllByTagId( + $entriesByTag = $this->entryRepository->findAllByTagId( $user->getId(), $tag->getId(), $sorts[$sort] @@ -123,7 +130,7 @@ class FeedController extends Controller $pagerAdapter = new ArrayAdapter($entriesByTag); - $entries = $this->get(PreparePagerForEntries::class)->prepare( + $entries = $preparePagerForEntries->prepare( $pagerAdapter, $user ); @@ -184,22 +191,20 @@ class FeedController extends Controller * * @return Response */ - private function showEntries($type, User $user, $page = 1) + private function showEntries(string $type, User $user, $page = 1) { - $repository = $this->get(EntryRepository::class); - switch ($type) { case 'starred': - $qb = $repository->getBuilderForStarredByUser($user->getId()); + $qb = $this->entryRepository->getBuilderForStarredByUser($user->getId()); break; case 'archive': - $qb = $repository->getBuilderForArchiveByUser($user->getId()); + $qb = $this->entryRepository->getBuilderForArchiveByUser($user->getId()); break; case 'unread': - $qb = $repository->getBuilderForUnreadByUser($user->getId()); + $qb = $this->entryRepository->getBuilderForUnreadByUser($user->getId()); break; case 'all': - $qb = $repository->getBuilderForAllByUser($user->getId()); + $qb = $this->entryRepository->getBuilderForAllByUser($user->getId()); break; default: throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); diff --git a/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php b/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php index 1414de8c1..941fc9275 100644 --- a/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php +++ b/src/Wallabag/CoreBundle/Controller/IgnoreOriginInstanceRuleController.php @@ -2,14 +2,14 @@ namespace Wallabag\CoreBundle\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Form; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Routing\Annotation\Route; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\IgnoreOriginInstanceRule; use Wallabag\CoreBundle\Form\Type\IgnoreOriginInstanceRuleType; use Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository; @@ -19,16 +19,25 @@ use Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository; * * @Route("/ignore-origin-instance-rules") */ -class IgnoreOriginInstanceRuleController extends Controller +class IgnoreOriginInstanceRuleController extends AbstractController { + private EntityManagerInterface $entityManager; + private TranslatorInterface $translator; + + public function __construct(EntityManagerInterface $entityManager, TranslatorInterface $translator) + { + $this->entityManager = $entityManager; + $this->translator = $translator; + } + /** * Lists all IgnoreOriginInstanceRule entities. * * @Route("/", name="ignore_origin_instance_rules_index", methods={"GET"}) */ - public function indexAction() + public function indexAction(IgnoreOriginInstanceRuleRepository $repository) { - $rules = $this->get(IgnoreOriginInstanceRuleRepository::class)->findAll(); + $rules = $repository->findAll(); return $this->render('@WallabagCore/IgnoreOriginInstanceRule/index.html.twig', [ 'rules' => $rules, @@ -50,13 +59,12 @@ class IgnoreOriginInstanceRuleController extends Controller $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $em = $this->get('doctrine')->getManager(); - $em->persist($ignoreOriginInstanceRule); - $em->flush(); + $this->entityManager->persist($ignoreOriginInstanceRule); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.ignore_origin_instance_rule.notice.added') + $this->translator->trans('flashes.ignore_origin_instance_rule.notice.added') ); return $this->redirectToRoute('ignore_origin_instance_rules_index'); @@ -82,13 +90,12 @@ class IgnoreOriginInstanceRuleController extends Controller $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { - $em = $this->get('doctrine')->getManager(); - $em->persist($ignoreOriginInstanceRule); - $em->flush(); + $this->entityManager->persist($ignoreOriginInstanceRule); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.ignore_origin_instance_rule.notice.updated') + $this->translator->trans('flashes.ignore_origin_instance_rule.notice.updated') ); return $this->redirectToRoute('ignore_origin_instance_rules_index'); @@ -114,14 +121,13 @@ class IgnoreOriginInstanceRuleController extends Controller $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.ignore_origin_instance_rule.notice.deleted') + $this->translator->trans('flashes.ignore_origin_instance_rule.notice.deleted') ); - $em = $this->get('doctrine')->getManager(); - $em->remove($ignoreOriginInstanceRule); - $em->flush(); + $this->entityManager->remove($ignoreOriginInstanceRule); + $this->entityManager->flush(); } return $this->redirectToRoute('ignore_origin_instance_rules_index'); diff --git a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php index e2b44e3eb..f55d11b4e 100644 --- a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php +++ b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php @@ -3,14 +3,14 @@ namespace Wallabag\CoreBundle\Controller; use Craue\ConfigBundle\Util\Config; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Form; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Routing\Annotation\Route; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\SiteCredential; use Wallabag\CoreBundle\Form\Type\SiteCredentialType; use Wallabag\CoreBundle\Helper\CryptoProxy; @@ -22,18 +22,31 @@ use Wallabag\UserBundle\Entity\User; * * @Route("/site-credentials") */ -class SiteCredentialController extends Controller +class SiteCredentialController extends AbstractController { + private EntityManagerInterface $entityManager; + private TranslatorInterface $translator; + private CryptoProxy $cryptoProxy; + private Config $craueConfig; + + public function __construct(EntityManagerInterface $entityManager, TranslatorInterface $translator, CryptoProxy $cryptoProxy, Config $craueConfig) + { + $this->entityManager = $entityManager; + $this->translator = $translator; + $this->cryptoProxy = $cryptoProxy; + $this->craueConfig = $craueConfig; + } + /** * Lists all User entities. * * @Route("/", name="site_credentials_index", methods={"GET"}) */ - public function indexAction() + public function indexAction(SiteCredentialRepository $repository) { $this->isSiteCredentialsEnabled(); - $credentials = $this->get(SiteCredentialRepository::class)->findByUser($this->getUser()); + $credentials = $repository->findByUser($this->getUser()); return $this->render('@WallabagCore/SiteCredential/index.html.twig', [ 'credentials' => $credentials, @@ -57,16 +70,15 @@ class SiteCredentialController extends Controller $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $credential->setUsername($this->get(CryptoProxy::class)->crypt($credential->getUsername())); - $credential->setPassword($this->get(CryptoProxy::class)->crypt($credential->getPassword())); + $credential->setUsername($this->cryptoProxy->crypt($credential->getUsername())); + $credential->setPassword($this->cryptoProxy->crypt($credential->getPassword())); - $em = $this->get('doctrine')->getManager(); - $em->persist($credential); - $em->flush(); + $this->entityManager->persist($credential); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.site_credential.notice.added', ['%host%' => $credential->getHost()]) + $this->translator->trans('flashes.site_credential.notice.added', ['%host%' => $credential->getHost()]) ); return $this->redirectToRoute('site_credentials_index'); @@ -96,16 +108,15 @@ class SiteCredentialController extends Controller $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { - $siteCredential->setUsername($this->get(CryptoProxy::class)->crypt($siteCredential->getUsername())); - $siteCredential->setPassword($this->get(CryptoProxy::class)->crypt($siteCredential->getPassword())); + $siteCredential->setUsername($this->cryptoProxy->crypt($siteCredential->getUsername())); + $siteCredential->setPassword($this->cryptoProxy->crypt($siteCredential->getPassword())); - $em = $this->get('doctrine')->getManager(); - $em->persist($siteCredential); - $em->flush(); + $this->entityManager->persist($siteCredential); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.site_credential.notice.updated', ['%host%' => $siteCredential->getHost()]) + $this->translator->trans('flashes.site_credential.notice.updated', ['%host%' => $siteCredential->getHost()]) ); return $this->redirectToRoute('site_credentials_index'); @@ -135,14 +146,13 @@ class SiteCredentialController extends Controller $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', - $this->get(TranslatorInterface::class)->trans('flashes.site_credential.notice.deleted', ['%host%' => $siteCredential->getHost()]) + $this->translator->trans('flashes.site_credential.notice.deleted', ['%host%' => $siteCredential->getHost()]) ); - $em = $this->get('doctrine')->getManager(); - $em->remove($siteCredential); - $em->flush(); + $this->entityManager->remove($siteCredential); + $this->entityManager->flush(); } return $this->redirectToRoute('site_credentials_index'); @@ -153,7 +163,7 @@ class SiteCredentialController extends Controller */ private function isSiteCredentialsEnabled() { - if (!$this->get(Config::class)->get('restricted_access')) { + if (!$this->craueConfig->get('restricted_access')) { throw $this->createNotFoundException('Feature "restricted_access" is disabled, controllers too.'); } } diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php index 0284f4794..1814976db 100644 --- a/src/Wallabag/CoreBundle/Controller/StaticController.php +++ b/src/Wallabag/CoreBundle/Controller/StaticController.php @@ -2,17 +2,17 @@ namespace Wallabag\CoreBundle\Controller; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; -class StaticController extends Controller +class StaticController extends AbstractController { /** * @Route("/howto", name="howto") */ public function howtoAction() { - $addonsUrl = $this->container->getParameter('addons_url'); + $addonsUrl = $this->getParameter('addons_url'); return $this->render( '@WallabagCore/Static/howto.html.twig', diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index d95727de3..75c0bc0b2 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -2,15 +2,16 @@ namespace Wallabag\CoreBundle\Controller; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\QueryBuilder; use Pagerfanta\Adapter\ArrayAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; -use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Routing\Annotation\Route; +use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Form\Type\NewTagType; @@ -21,29 +22,55 @@ use Wallabag\CoreBundle\Helper\TagsAssigner; use Wallabag\CoreBundle\Repository\EntryRepository; use Wallabag\CoreBundle\Repository\TagRepository; -class TagController extends Controller +class TagController extends AbstractController { + private EntityManagerInterface $entityManager; + private TagsAssigner $tagsAssigner; + private Redirect $redirectHelper; + + public function __construct(EntityManagerInterface $entityManager, TagsAssigner $tagsAssigner, Redirect $redirectHelper) + { + $this->entityManager = $entityManager; + $this->tagsAssigner = $tagsAssigner; + $this->redirectHelper = $redirectHelper; + } + /** - * @Route("/new-tag/{entry}", requirements={"entry" = "\d+"}, name="new_tag") + * @Route("/new-tag/{entry}", requirements={"entry" = "\d+"}, name="new_tag", methods={"POST"}) * * @return Response */ - public function addTagFormAction(Request $request, Entry $entry) + public function addTagFormAction(Request $request, Entry $entry, TranslatorInterface $translator) { $form = $this->createForm(NewTagType::class, new Tag()); $form->handleRequest($request); + $tags = $form->get('label')->getData(); + $tagsExploded = explode(',', $tags); + + // avoid too much tag to be added + if (\count($tagsExploded) >= NewTagType::MAX_TAGS || \strlen($tags) >= NewTagType::MAX_LENGTH) { + $message = $translator->trans('flashes.tag.notice.too_much_tags', [ + '%tags%' => NewTagType::MAX_TAGS, + '%characters%' => NewTagType::MAX_LENGTH, + ]); + $this->addFlash('notice', $message); + + return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()])); + } + if ($form->isSubmitted() && $form->isValid()) { - $this->get(TagsAssigner::class)->assignTagsToEntry( + $this->checkUserAction($entry); + + $this->tagsAssigner->assignTagsToEntry( $entry, $form->get('label')->getData() ); - $em = $this->get('doctrine')->getManager(); - $em->persist($entry); - $em->flush(); + $this->entityManager->persist($entry); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', 'flashes.tag.notice.tag_added' ); @@ -66,17 +93,18 @@ class TagController extends Controller */ public function removeTagFromEntry(Request $request, Entry $entry, Tag $tag) { + $this->checkUserAction($entry); + $entry->removeTag($tag); - $em = $this->get('doctrine')->getManager(); - $em->flush(); + $this->entityManager->flush(); // remove orphan tag in case no entries are associated to it if (0 === \count($tag->getEntries())) { - $em->remove($tag); - $em->flush(); + $this->entityManager->remove($tag); + $this->entityManager->flush(); } - $redirectUrl = $this->get(Redirect::class)->to($request->getSession()->get('prevUrl'), '', true); + $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl'), '', true); return $this->redirect($redirectUrl); } @@ -88,12 +116,10 @@ class TagController extends Controller * * @return Response */ - public function showTagAction() + public function showTagAction(TagRepository $tagRepository, EntryRepository $entryRepository) { - $tags = $this->get(TagRepository::class) - ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); - $nbEntriesUntagged = $this->get(EntryRepository::class) - ->countUntaggedEntriesByUser($this->getUser()->getId()); + $tags = $tagRepository->findAllFlatTagsWithNbEntries($this->getUser()->getId()); + $nbEntriesUntagged = $entryRepository->countUntaggedEntriesByUser($this->getUser()->getId()); $renameForms = []; foreach ($tags as $tag) { @@ -115,16 +141,16 @@ class TagController extends Controller * * @return Response */ - public function showEntriesForTagAction(Tag $tag, $page, Request $request) + public function showEntriesForTagAction(Tag $tag, EntryRepository $entryRepository, PreparePagerForEntries $preparePagerForEntries, $page, Request $request) { - $entriesByTag = $this->get(EntryRepository::class)->findAllByTagId( + $entriesByTag = $entryRepository->findAllByTagId( $this->getUser()->getId(), $tag->getId() ); $pagerAdapter = new ArrayAdapter($entriesByTag); - $entries = $this->get(PreparePagerForEntries::class)->prepare($pagerAdapter); + $entries = $preparePagerForEntries->prepare($pagerAdapter); try { $entries->setCurrentPage($page); @@ -154,12 +180,12 @@ class TagController extends Controller * * @return Response */ - public function renameTagAction(Tag $tag, Request $request) + public function renameTagAction(Tag $tag, Request $request, TagRepository $tagRepository, EntryRepository $entryRepository) { $form = $this->createForm(RenameTagType::class, new Tag()); $form->handleRequest($request); - $redirectUrl = $this->get(Redirect::class)->to($request->getSession()->get('prevUrl'), '', true); + $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl'), '', true); if ($form->isSubmitted() && $form->isValid()) { $newTag = new Tag(); @@ -169,18 +195,18 @@ class TagController extends Controller return $this->redirect($redirectUrl); } - $tagFromRepo = $this->get(TagRepository::class)->findOneByLabel($newTag->getLabel()); + $tagFromRepo = $tagRepository->findOneByLabel($newTag->getLabel()); if (null !== $tagFromRepo) { $newTag = $tagFromRepo; } - $entries = $this->get(EntryRepository::class)->findAllByTagId( + $entries = $entryRepository->findAllByTagId( $this->getUser()->getId(), $tag->getId() ); foreach ($entries as $entry) { - $this->get(TagsAssigner::class)->assignTagsToEntry( + $this->tagsAssigner->assignTagsToEntry( $entry, $newTag->getLabel(), [$newTag] @@ -188,9 +214,9 @@ class TagController extends Controller $entry->removeTag($tag); } - $this->get('doctrine')->getManager()->flush(); + $this->entityManager->flush(); - $this->get(SessionInterface::class)->getFlashBag()->add( + $this->addFlash( 'notice', 'flashes.tag.notice.tag_renamed' ); @@ -206,28 +232,32 @@ class TagController extends Controller * * @return Response */ - public function tagThisSearchAction($filter, Request $request) + public function tagThisSearchAction($filter, Request $request, EntryRepository $entryRepository) { $currentRoute = $request->query->has('currentRoute') ? $request->query->get('currentRoute') : ''; /** @var QueryBuilder $qb */ - $qb = $this->get(EntryRepository::class)->getBuilderForSearchByUser($this->getUser()->getId(), $filter, $currentRoute); - $em = $this->get('doctrine')->getManager(); + $qb = $entryRepository->getBuilderForSearchByUser($this->getUser()->getId(), $filter, $currentRoute); $entries = $qb->getQuery()->getResult(); foreach ($entries as $entry) { - $this->get(TagsAssigner::class)->assignTagsToEntry( + $this->tagsAssigner->assignTagsToEntry( $entry, $filter ); - $em->persist($entry); + // check to avoid duplicate tags creation + foreach ($this->entityManager->getUnitOfWork()->getScheduledEntityInsertions() as $entity) { + if ($entity instanceof Tag && strtolower($entity->getLabel()) === strtolower($filter)) { + continue 2; + } + $this->entityManager->persist($entry); + } + $this->entityManager->flush(); } - $em->flush(); - - return $this->redirect($this->get(Redirect::class)->to($request->getSession()->get('prevUrl'), '', true)); + return $this->redirect($this->redirectHelper->to($request->headers->get('prevUrl'), '', true)); } /** @@ -238,19 +268,29 @@ class TagController extends Controller * * @return Response */ - public function removeTagAction(Tag $tag, Request $request) + public function removeTagAction(Tag $tag, Request $request, EntryRepository $entryRepository) { foreach ($tag->getEntriesByUserId($this->getUser()->getId()) as $entry) { - $this->get(EntryRepository::class)->removeTag($this->getUser()->getId(), $tag); + $entryRepository->removeTag($this->getUser()->getId(), $tag); } // remove orphan tag in case no entries are associated to it if (0 === \count($tag->getEntries())) { - $em = $this->get('doctrine')->getManager(); - $em->remove($tag); - $em->flush(); + $this->entityManager->remove($tag); + $this->entityManager->flush(); } + $redirectUrl = $this->redirectHelper->to($request->headers->get('prevUrl'), '', true); - return $this->redirect($this->get(Redirect::class)->to($request->getSession()->get('prevUrl'), '', true)); + return $this->redirect($redirectUrl); + } + + /** + * Check if the logged user can manage the given entry. + */ + private function checkUserAction(Entry $entry) + { + if (null === $this->getUser() || $this->getUser()->getId() !== $entry->getUser()->getId()) { + throw $this->createAccessDeniedException('You can not access this entry.'); + } } } diff --git a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php index a8a1a78ae..77809f95b 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php @@ -23,6 +23,7 @@ class ConfigFixtures extends Fixture implements DependentFixtureInterface $adminConfig->setPocketConsumerKey('xxxxx'); $adminConfig->setActionMarkAsRead(0); $adminConfig->setListMode(0); + $adminConfig->setDisplayThumbnails(0); $manager->persist($adminConfig); @@ -35,6 +36,7 @@ class ConfigFixtures extends Fixture implements DependentFixtureInterface $bobConfig->setPocketConsumerKey(null); $bobConfig->setActionMarkAsRead(1); $bobConfig->setListMode(1); + $bobConfig->setDisplayThumbnails(1); $manager->persist($bobConfig); @@ -47,6 +49,7 @@ class ConfigFixtures extends Fixture implements DependentFixtureInterface $emptyConfig->setPocketConsumerKey(null); $emptyConfig->setActionMarkAsRead(0); $emptyConfig->setListMode(0); + $emptyConfig->setDisplayThumbnails(0); $manager->persist($emptyConfig); diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php index 34d24b6bb..91ea7a326 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/Configuration.php @@ -9,8 +9,8 @@ class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('wallabag_core'); + $treeBuilder = new TreeBuilder('wallabag_core'); + $rootNode = $treeBuilder->getRootNode(); $rootNode ->children() @@ -46,6 +46,9 @@ class Configuration implements ConfigurationInterface ->scalarNode('list_mode') ->defaultValue(1) ->end() + ->scalarNode('display_thumbnails') + ->defaultValue(1) + ->end() ->scalarNode('api_limit_mass_actions') ->defaultValue(10) ->end() diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index 648595a7c..0eabaa075 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -22,6 +22,7 @@ class WallabagCoreExtension extends Extension $container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']); $container->setParameter('wallabag_core.action_mark_as_read', $config['action_mark_as_read']); $container->setParameter('wallabag_core.list_mode', $config['list_mode']); + $container->setParameter('wallabag_core.display_thumbnails', $config['display_thumbnails']); $container->setParameter('wallabag_core.fetching_error_message', $config['fetching_error_message']); $container->setParameter('wallabag_core.fetching_error_message_title', $config['fetching_error_message_title']); $container->setParameter('wallabag_core.api_limit_mass_actions', $config['api_limit_mass_actions']); diff --git a/src/Wallabag/CoreBundle/Doctrine/JsonArrayType.php b/src/Wallabag/CoreBundle/Doctrine/JsonArrayType.php new file mode 100644 index 000000000..0580e9ab4 --- /dev/null +++ b/src/Wallabag/CoreBundle/Doctrine/JsonArrayType.php @@ -0,0 +1,46 @@ +displayThumbnails; + } + + /** + * @return Config + */ + public function setDisplayThumbnails(bool $displayThumbnails) + { + $this->displayThumbnails = $displayThumbnails; + + return $this; + } + /** * @return Config */ diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php index 6588785bf..ed4298adf 100644 --- a/src/Wallabag/CoreBundle/Entity/Tag.php +++ b/src/Wallabag/CoreBundle/Entity/Tag.php @@ -45,7 +45,7 @@ class Tag /** * @Expose - * @Gedmo\Slug(fields={"label"}) + * @Gedmo\Slug(fields={"label"}, prefix="t:") * @ORM\Column(length=128, unique=true) */ private $slug; diff --git a/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php index e9061d044..c0d39fb30 100644 --- a/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php +++ b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php @@ -2,7 +2,7 @@ namespace Wallabag\CoreBundle\Event; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Wallabag\CoreBundle\Entity\Entry; /** @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\Entry; */ class EntryDeletedEvent extends Event { - const NAME = 'entry.deleted'; + public const NAME = 'entry.deleted'; protected $entry; @@ -19,7 +19,7 @@ class EntryDeletedEvent extends Event $this->entry = $entry; } - public function getEntry() + public function getEntry(): Entry { return $this->entry; } diff --git a/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php b/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php index 5fdb52212..e58301ec3 100644 --- a/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php +++ b/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php @@ -2,7 +2,7 @@ namespace Wallabag\CoreBundle\Event; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Wallabag\CoreBundle\Entity\Entry; /** @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\Entry; */ class EntrySavedEvent extends Event { - const NAME = 'entry.saved'; + public const NAME = 'entry.saved'; protected $entry; @@ -19,7 +19,7 @@ class EntrySavedEvent extends Event $this->entry = $entry; } - public function getEntry() + public function getEntry(): Entry { return $this->entry; } diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php index 7dd95994a..4b9d5c243 100644 --- a/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php +++ b/src/Wallabag/CoreBundle/Event/Subscriber/SQLiteCascadeDeleteSubscriber.php @@ -2,10 +2,10 @@ namespace Wallabag\CoreBundle\Event\Subscriber; -use Doctrine\Bundle\DoctrineBundle\Registry; use Doctrine\Common\EventSubscriber; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\ORM\Event\LifecycleEventArgs; +use Doctrine\Persistence\ManagerRegistry; use Wallabag\CoreBundle\Entity\Entry; /** @@ -19,7 +19,7 @@ class SQLiteCascadeDeleteSubscriber implements EventSubscriber { private $doctrine; - public function __construct(Registry $doctrine) + public function __construct(ManagerRegistry $doctrine) { $this->doctrine = $doctrine; } diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index ae8714084..8f63551fc 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -3,6 +3,7 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\IntegerType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; @@ -29,6 +30,11 @@ class ConfigType extends AbstractType 'label' => 'config.form_settings.items_per_page_label', 'property_path' => 'itemsPerPage', ]) + ->add('display_thumbnails', CheckboxType::class, [ + 'label' => 'config.form_settings.display_thumbnails_label', + 'property_path' => 'displayThumbnails', + 'required' => false, + ]) ->add('reading_speed', IntegerType::class, [ 'label' => 'config.form_settings.reading_speed.label', 'property_path' => 'readingSpeed', diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php index ed4fa67a2..adff45cc2 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php @@ -11,6 +11,9 @@ use Wallabag\CoreBundle\Entity\Tag; class NewTagType extends AbstractType { + public const MAX_LENGTH = 40; + public const MAX_TAGS = 5; + public function buildForm(FormBuilderInterface $builder, array $options) { $builder @@ -18,6 +21,7 @@ class NewTagType extends AbstractType 'required' => true, 'attr' => [ 'placeholder' => 'tag.new.placeholder', + 'max_length' => self::MAX_LENGTH, ], ]) ->add('add', SubmitType::class, [ diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index cb64b4b74..918f10c66 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Helper; use Graby\Graby; use Psr\Log\LoggerInterface; -use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser; +use Symfony\Component\Mime\MimeTypes; use Symfony\Component\Validator\Constraints\Locale as LocaleConstraint; use Symfony\Component\Validator\Constraints\Url as UrlConstraint; use Symfony\Component\Validator\Validator\ValidatorInterface; @@ -22,7 +22,7 @@ class ContentProxy protected $ignoreOriginProcessor; protected $validator; protected $logger; - protected $mimeGuesser; + protected $mimeTypes; protected $fetchingErrorMessage; protected $eventDispatcher; protected $storeArticleHeaders; @@ -34,7 +34,7 @@ class ContentProxy $this->ignoreOriginProcessor = $ignoreOriginProcessor; $this->validator = $validator; $this->logger = $logger; - $this->mimeGuesser = new MimeTypeExtensionGuesser(); + $this->mimeTypes = new MimeTypes(); $this->fetchingErrorMessage = $fetchingErrorMessage; $this->storeArticleHeaders = $storeArticleHeaders; } @@ -296,7 +296,7 @@ class ContentProxy } // if content is an image, define it as a preview too - if (!empty($content['headers']['content-type']) && \in_array($this->mimeGuesser->guess($content['headers']['content-type']), ['jpeg', 'jpg', 'gif', 'png'], true)) { + if (!empty($content['headers']['content-type']) && \in_array(current($this->mimeTypes->getExtensions($content['headers']['content-type'])), ['jpeg', 'jpg', 'gif', 'png'], true)) { $previewPictureUrl = $content['url']; } elseif (empty($previewPictureUrl)) { $this->logger->debug('Extracting images from content to provide a default preview picture'); diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index 970f5522d..f5b6aa99b 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -7,6 +7,7 @@ use GuzzleHttp\Psr7\Uri; use GuzzleHttp\Psr7\UriResolver; use Http\Client\Common\HttpMethodsClient; use Http\Client\Common\Plugin\ErrorPlugin; +use Http\Client\Common\Plugin\RedirectPlugin; use Http\Client\Common\PluginClient; use Http\Client\HttpClient; use Http\Discovery\MessageFactoryDiscovery; @@ -15,25 +16,25 @@ use Psr\Http\Message\ResponseInterface; use Psr\Log\LoggerInterface; use Symfony\Component\DomCrawler\Crawler; use Symfony\Component\Finder\Finder; -use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser; +use Symfony\Component\Mime\MimeTypes; class DownloadImages { - const REGENERATE_PICTURES_QUALITY = 80; + public const REGENERATE_PICTURES_QUALITY = 80; private $client; private $baseFolder; private $logger; - private $mimeGuesser; + private $mimeTypes; private $wallabagUrl; public function __construct(HttpClient $client, $baseFolder, $wallabagUrl, LoggerInterface $logger, MessageFactory $messageFactory = null) { - $this->client = new HttpMethodsClient(new PluginClient($client, [new ErrorPlugin()]), $messageFactory ?: MessageFactoryDiscovery::find()); + $this->client = new HttpMethodsClient(new PluginClient($client, [new ErrorPlugin(), new RedirectPlugin()]), $messageFactory ?: MessageFactoryDiscovery::find()); $this->baseFolder = $baseFolder; $this->wallabagUrl = rtrim($wallabagUrl, '/'); $this->logger = $logger; - $this->mimeGuesser = new MimeTypeExtensionGuesser(); + $this->mimeTypes = new MimeTypes(); $this->setFolder(); } @@ -86,12 +87,14 @@ class DownloadImages continue; } - // if image contains "&" and we can't find it in the html it might be because it's encoded as & - if (false !== stripos($image, '&') && false === stripos($html, $image)) { - $image = str_replace('&', '&', $image); - } - $html = str_replace($image, $newImage, $html); + // if image contains "&" and we can't find it in the html it might be because it's encoded as & or unicode + if (false !== stripos($image, '&') && false === stripos($html, $image)) { + $imageAmp = str_replace('&', '&', $image); + $html = str_replace($imageAmp, $newImage, $html); + $imageUnicode = str_replace('&', '&', $image); + $html = str_replace($imageUnicode, $newImage, $html); + } } return $html; @@ -355,7 +358,7 @@ class DownloadImages */ private function getExtensionFromResponse(ResponseInterface $res, $imagePath) { - $ext = $this->mimeGuesser->guess(current($res->getHeader('content-type'))); + $ext = current($this->mimeTypes->getExtensions(current($res->getHeader('content-type')))); $this->logger->debug('DownloadImages: Checking extension', ['ext' => $ext, 'header' => $res->getHeader('content-type')]); // ok header doesn't have the extension, try a different way diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index b39fcf257..350a396f8 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php @@ -9,7 +9,7 @@ use PHPePub\Core\EPub; use PHPePub\Core\Structure\OPF\DublinCore; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\UserBundle\Entity\User; @@ -210,7 +210,7 @@ class EntriesExport $publishedDate = $entry->getPublishedAt()->format('Y-m-d'); } - $readingTime = $entry->getReadingTime() / $user->getConfig()->getReadingSpeed() * 200; + $readingTime = round($entry->getReadingTime() / $user->getConfig()->getReadingSpeed() * 200); $titlepage = $content_start . '

' . $entry->getTitle() . '

' . diff --git a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php index 0b4e1e29f..203e9bcc7 100644 --- a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php +++ b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php @@ -47,7 +47,7 @@ class TagsAssigner $label = trim(mb_convert_case($label, \MB_CASE_LOWER)); // avoid empty tag - if (0 === \strlen($label)) { + if ('' === $label) { continue; } diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php index 28ca892ab..e61b2eca9 100644 --- a/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php +++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameFeedTokenConverter.php @@ -2,7 +2,7 @@ namespace Wallabag\CoreBundle\ParamConverter; -use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Persistence\ManagerRegistry; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface; use Symfony\Component\HttpFoundation\Request; @@ -77,6 +77,10 @@ class UsernameFeedTokenConverter implements ParamConverterInterface // Get actual entity manager for class $em = $this->registry->getManagerForClass($configuration->getClass()); + if (null === $em) { + return false; + } + /** @var UserRepository $userRepository */ $userRepository = $em->getRepository($configuration->getClass()); diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index a5d5fed5a..9dded5e57 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -383,7 +383,7 @@ class EntryRepository extends ServiceEntityRepository * Remove tags from all user entries. * * @param int $userId - * @param Array $tags + * @param array $tags */ public function removeTags($userId, $tags) { diff --git a/src/Wallabag/CoreBundle/Resources/config/routing.yml b/src/Wallabag/CoreBundle/Resources/config/routing.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/Wallabag/CoreBundle/Resources/views/.DS_Store b/src/Wallabag/CoreBundle/Resources/views/.DS_Store deleted file mode 100644 index c3922be93..000000000 Binary files a/src/Wallabag/CoreBundle/Resources/views/.DS_Store and /dev/null differ diff --git a/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig index 7f31d2983..8681b20c2 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Config/index.html.twig @@ -9,7 +9,7 @@
- +
+
+ {{ form_errors(form.config.display_thumbnails) }} + {{ form_widget(form.config.display_thumbnails) }} + {{ form_label(form.config.display_thumbnails, null, {'label_attr': {'class': 'settings-checkbox-label'}}) }} +
+ +
+
{{ form_errors(form.config.reading_speed) }} @@ -45,7 +58,7 @@ {{ form_label(form.config.reading_speed) }}

{{ 'config.form_settings.reading_speed.help_message'|trans }} - myreadspeed + myreadspeed

@@ -56,7 +69,7 @@
-
+
{{ form_errors(form.config.action_mark_as_read) }} {{ form_widget(form.config.action_mark_as_read) }} {{ form_label(form.config.action_mark_as_read) }} @@ -83,7 +96,7 @@ {{ form_label(form.config.pocket_consumer_key) }}

» - https://getpocket.com/developer/docs/authentication + https://getpocket.com/developer/docs/authentication

@@ -196,38 +209,36 @@ {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} - {% if twofactor_auth %} -
-
-
-
{{ 'config.otp.page_title'|trans }}
+
+
+
+
{{ 'config.otp.page_title'|trans }}
-

{{ 'config.form_user.two_factor_description'|trans }}

+

{{ 'config.form_user.two_factor_description'|trans }}

- - - - - - - - +
{{ 'config.form_user.two_factor.table_method'|trans }}{{ 'config.form_user.two_factor.table_state'|trans }}{{ 'config.form_user.two_factor.table_action'|trans }}
+ + + + + + + - - - - - - - - - - - - -
{{ 'config.form_user.two_factor.table_method'|trans }}{{ 'config.form_user.two_factor.table_state'|trans }}{{ 'config.form_user.two_factor.table_action'|trans }}
{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}{% if app.user.isEmailTwoFactor %}{{ 'config.form_user.two_factor.state_enabled'|trans }}{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}{{ 'config.form_user.two_factor.action_email'|trans }} {% if app.user.isEmailTwoFactor %}Disable{% endif %}
{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}{% if app.user.isGoogleTwoFactor %}{{ 'config.form_user.two_factor.state_enabled'|trans }}{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}{{ 'config.form_user.two_factor.action_app'|trans }} {% if app.user.isGoogleTwoFactor %}Disable{% endif %}
-
- {% endif %} + + + {{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }} + {% if app.user.isEmailTwoFactor %}{{ 'config.form_user.two_factor.state_enabled'|trans }}{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %} + {{ 'config.form_user.two_factor.action_email'|trans }} {% if app.user.isEmailTwoFactor %}Disable{% endif %} + + + {{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }} + {% if app.user.isGoogleTwoFactor %}{{ 'config.form_user.two_factor.state_enabled'|trans }}{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %} + {{ 'config.form_user.two_factor.action_app'|trans }} {% if app.user.isGoogleTwoFactor %}Disable{% endif %} + + + +
{{ form_widget(form.user._token) }}
@@ -561,9 +572,11 @@
{{ 'config.form_user.delete.title'|trans }}

{{ 'config.form_user.delete.description'|trans }}

- +
+ + + +
{% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/Developer/howto_app.html.twig index 5027de938..7e3d8e4fc 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Developer/howto_app.html.twig @@ -2,11 +2,6 @@ {% block title %}{{ 'developer.howto.page_title'|trans }}{% endblock %} -{% block css %} - {{ parent() }} - -{% endblock %} - {% block content %}
@@ -18,7 +13,7 @@

{{ 'developer.howto.description.paragraph_3'|trans({'%link%': path('developer_create_client')})|raw }}

{{ 'developer.howto.description.paragraph_4'|trans }}

-

http POST https://app.wallabag.it/oauth/v2/token \
+                    
http POST {{ wallabag_url }}/oauth/v2/token \
     grant_type=password \
     client_id=12_5um6nz50ceg4088c0840wwc0kgg44g00kk84og044ggkscso0k \
     client_secret=3qd12zpeaxes8cwg8c0404g888co4wo8kc4gcw0occww8cgw4k \
@@ -47,7 +42,7 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13
                 

{{ 'developer.howto.description.paragraph_6'|trans }}

-

http GET https://app.wallabag.it/api/entries.json \
+                    
http GET {{ wallabag_url }}/api/entries.json \
     "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"

{{ 'developer.howto.description.paragraph_7'|trans }}

@@ -58,6 +53,4 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13
- - {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_content.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_content.html.twig index f1038a9ae..34bf483d7 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_content.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_content.html.twig @@ -3,7 +3,7 @@ more_vert {% endif %} - {{ entry.title|striptags|truncate(80, true, '…')|default('entry.default_title'|trans)|raw }} + {{ entry.title|striptags|u.truncate(80, '…', false)|default('entry.default_title'|trans)|raw }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_mass_checkbox.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_mass_checkbox.html.twig index d35d8db13..503be8ae2 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_mass_checkbox.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/Card/_mass_checkbox.html.twig @@ -1,3 +1,3 @@
- +
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig index 0b6d9701e..26e78215b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_actions.html.twig @@ -18,7 +18,7 @@ {% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}
  • - delete + delete
  • diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_full_image.html.twig index 6ca075576..2624ae451 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_full_image.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_full_image.html.twig @@ -6,9 +6,11 @@
  • {{ tag.label }}
  • {% endfor %} + {% if app.user.config.displayThumbnails %} + {% endif %}
    {% include "@WallabagCore/Entry/Card/_content.html.twig" with {'entry': entry} only %}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig index dfad1279c..78e97ea37 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_list.html.twig @@ -1,11 +1,13 @@
    {% include "@WallabagCore/Entry/Card/_mass_checkbox.html.twig" with {'entry': entry} only %} + {% if app.user.config.displayThumbnails %} + {% endif %} {% include "@WallabagCore/Entry/Card/_content.html.twig" with {'entry': entry, 'withMetadata': true, 'subClass': 'metadata'} only %}
    • diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_preview.html.twig index 4ab5e44ea..82fde9c9b 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/_card_preview.html.twig @@ -1,15 +1,18 @@
      -
      +
      + {% include "@WallabagCore/Entry/Card/_mass_checkbox.html.twig" with {'entry': entry} only %} + {% if app.user.config.displayThumbnails %} {% set preview_class_modifier = entry.previewPicture ? '' : ' preview--default' %} + {% endif %}
      {% include "@WallabagCore/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %}
      @@ -18,7 +21,7 @@ clear - {{ entry.title|striptags|truncate(80, true, '…')|raw }} + {{ entry.title|striptags|u.truncate(80, '…', false)|raw }} diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/_feed_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/_feed_link.html.twig index 7e84da66d..97691c0ab 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/_feed_link.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/_feed_link.html.twig @@ -1,11 +1,14 @@ {% if tag is defined %} - rss_feed + {% set feed_route = 'tag_feed' %} + {% set slug = tag.slug %} {% elseif current_route in ['homepage', 'unread', 'starred', 'archive', 'all'] %} {% set feed_route = current_route %} {% if current_route == 'homepage' %} {% set feed_route = 'unread' %} {% endif %} {% set feed_route = feed_route ~ '_feed' %} - - rss_feed + {% set slug = null %} +{% endif %} +{% if feed_route is defined %} + rss_feed {% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/_tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/_tags.html.twig index 2c39028bf..b6c84d959 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/_tags.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/_tags.html.twig @@ -1,10 +1,10 @@ {% if tags is iterable and tags is not empty %}
        {% for tag in tags %} -
      • - {{ tag.label }} +
      • + {{ tag.label }} {% if withRemove is defined and withRemove == true %} - + delete {% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig index 7368bfcee..443e4fb64 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.html.twig @@ -29,57 +29,60 @@
        {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} - {% if list_mode == 0 %}view_list{% else %}view_module{% endif %} + {% if entries.count > 0 %} + {% if list_mode == 0 %}view_list{% else %}view_module{% endif %} + {% endif %} + {% if entries.count > 0 %} + + {% endif %} {% if app.user.config.feedToken %} {% include "@WallabagCore/Entry/_feed_link.html.twig" %} {% endif %}
        {% if current_route == 'search' %}{% endif %} {% if entries.getNbPages > 1 %} - {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} + {{ pagerfanta(entries, 'default_wallabag') }} {% endif %}
        - {% if list_mode == 1 %} -
        - {% if entries.count > 0 and list_mode == 1 %} - -   - + {% if entries.count > 0 %} + +
        +
        + + + + + +
        - - - - - - - - - - - {% endif %} + +
        + + +
        + +
          + + {% for entry in entries %} +
        1. + {% if list_mode == 1 %} + {% include "@WallabagCore/Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} + {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} + {% include "@WallabagCore/Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} + {% else %} + {% include "@WallabagCore/Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} + {% endif %} +
        2. + {% endfor %} +
        {% endif %} - -
          - - {% for entry in entries %} -
        1. - {% if list_mode == 1 %} - {% include "@WallabagCore/Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} - {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} - {% include "@WallabagCore/Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} - {% else %} - {% include "@WallabagCore/Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %} - {% endif %} -
        2. - {% endfor %} -
        {% if entries.getNbPages > 1 %}
        - {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} + {{ pagerfanta(entries, 'default_wallabag') }}
        {% endif %} @@ -93,16 +96,17 @@ {% if searchTerm is defined %} {% set export_search_term = searchTerm %} {% endif %} + {% set entry = app.request.attributes.get('id') %} {% set previous_route = app.request.attributes.get('currentRoute') %}

        {{ 'entry.list.export_title'|trans }}

          - {% if craue_setting('export_epub') %}
        • EPUB
        • {% endif %} - {% if craue_setting('export_mobi') %}
        • MOBI (deprecated)
        • {% endif %} - {% if craue_setting('export_pdf') %}
        • PDF
        • {% endif %} - {% if craue_setting('export_json') %}
        • JSON
        • {% endif %} - {% if craue_setting('export_csv') %}
        • CSV
        • {% endif %} - {% if craue_setting('export_txt') %}
        • TXT
        • {% endif %} - {% if craue_setting('export_xml') %}
        • XML
        • {% endif %} + {% if craue_setting('export_epub') %}
        • EPUB
        • {% endif %} + {% if craue_setting('export_mobi') %}
        • MOBI (deprecated)
        • {% endif %} + {% if craue_setting('export_pdf') %}
        • PDF
        • {% endif %} + {% if craue_setting('export_json') %}
        • JSON
        • {% endif %} + {% if craue_setting('export_csv') %}
        • CSV
        • {% endif %} + {% if craue_setting('export_txt') %}
        • TXT
        • {% endif %} + {% if craue_setting('export_xml') %}
        • XML
        • {% endif %}
        diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig index 071ebb251..59a3cf62e 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig @@ -36,7 +36,7 @@
      -
        +
        • arrow_back @@ -232,12 +232,12 @@ {% endblock %} {% block content %} -
          +
          -

          {{ entry.title|striptags|default('entry.default_title'|trans)|raw }} create

          +

          {{ entry.title|striptags|default('entry.default_title'|trans)|raw }} create

          -