Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Sylius 1.13 #215

Merged
merged 6 commits into from
Jul 18, 2024
Merged

Conversation

maximehuran
Copy link
Member

@maximehuran maximehuran commented Jul 13, 2024

Sylius 1.13 compatibility

closes #207

Compatibility

Sylius Version PHP Version
1.11 8.0 - 8.1
1.12 8.1 - 8.2
1.13 8.1 - 8.2

Requirement of nikic/php-parser downgrade version to 4.0

When setup Sylius 1.13, nikic/php-parser="^5.0" is installed, but jane-php/automapper requires nikic/php-parser="^4.0".

This is the last version of the Search plugin using jane-php/automapper.
The next version will use jolicode/automapper, which is compatible with nikic/php-parser="^5.0". See #214

So to require the plugin, you need before to require nikic/php-parser="^4.0" :

composer require --no-progress --no-interaction nikic/php-parser="^4.0"
composer require monsieurbiz/sylius-search-plugin

Populate command

image

Front display

image

Taxon

image

Filtered

image

Search

image

Filtered

image

Admin product option

image

Admin product attribute

image

@maximehuran maximehuran force-pushed the feature/sylius-1-13 branch from 5aa9562 to ee94165 Compare July 13, 2024 13:57
Comment on lines +33 to +34
composer require --no-progress --no-interaction nikic/php-parser="^4.0"
composer require monsieurbiz/sylius-search-plugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 thought: to avoid adding this restriction to composer.json, you can also use the -W option

Suggested change
composer require --no-progress --no-interaction nikic/php-parser="^4.0"
composer require monsieurbiz/sylius-search-plugin
composer require monsieurbiz/sylius-search-plugin -W

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try this today to be sure it will not change others packages versions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--with-dependencies (-w): Update also dependencies of packages in the argument list, except those which are root requirements.
--with-all-dependencies (-W): Update also dependencies of packages in the argument list, including those which are root requirements.

With -w in lower case I have this diff :

(cd tests/Application && symfony composer require --no-progress --no-interaction monsieurbiz/sylius-search-plugin="*@dev" -w)
./composer.json has been updated
Running composer update monsieurbiz/sylius-search-plugin --with-dependencies
Loading composer repositories with package information
Dependency sylius/sylius is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Restricting packages listed in "symfony/symfony" to "^6.4"
Updating dependencies
Lock file operations: 12 installs, 7 updates, 0 removals
  - Locking elasticsearch/elasticsearch (v7.17.2)
  - Locking ezimuel/guzzlestreams (3.1.0)
  - Locking ezimuel/ringphp (1.2.2)
  - Locking jacquesbh/eater (v2.0.4)
  - Locking jane-php/automapper (v7.5.3)
  - Locking jane-php/automapper-bundle (v7.5.3)
  - Locking jolicode/elastically (v1.9.1)
  - Locking monsieurbiz/sylius-search-plugin (dev-master)
  - Locking monsieurbiz/sylius-settings-plugin (v1.2.0)
  - Downgrading nikic/php-parser (v5.1.0 => v4.19.1)
  - Locking nyholm/dsn (2.0.1)
  - Locking react/promise (v2.11.0)
  - Locking ruflin/elastica (7.3.2)
  - Downgrading symfony/cache (v7.1.2 => v6.4.8)
  - Downgrading symfony/clock (v7.1.1 => v6.4.8)
  - Downgrading symfony/error-handler (v7.1.2 => v6.4.9)
  - Downgrading symfony/mime (v7.1.2 => v6.4.9)
  - Downgrading symfony/var-dumper (v7.1.2 => v6.4.9)
  - Downgrading symfony/var-exporter (v7.1.2 => v6.4.9)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 12 installs, 7 updates, 0 removals
  - Downgrading symfony/var-exporter (v7.1.2 => v6.4.9): Extracting archive
  - Installing react/promise (v2.11.0): Extracting archive
  - Installing ezimuel/guzzlestreams (3.1.0): Extracting archive
  - Installing ezimuel/ringphp (1.2.2): Extracting archive
  - Downgrading symfony/var-dumper (v7.1.2 => v6.4.9): Extracting archive
  - Downgrading symfony/error-handler (v7.1.2 => v6.4.9): Extracting archive
  - Downgrading nikic/php-parser (v5.1.0 => v4.19.1): Extracting archive
  - Installing jane-php/automapper (v7.5.3): Extracting archive
  - Downgrading symfony/cache (v7.1.2 => v6.4.8): Extracting archive
  - Downgrading symfony/clock (v7.1.1 => v6.4.8): Extracting archive
  - Downgrading symfony/mime (v7.1.2 => v6.4.9): Extracting archive
  - Installing monsieurbiz/sylius-settings-plugin (v1.2.0): Extracting archive
  - Installing nyholm/dsn (2.0.1): Extracting archive
  - Installing elasticsearch/elasticsearch (v7.17.2): Extracting archive
  - Installing ruflin/elastica (7.3.2): Extracting archive
  - Installing jolicode/elastically (v1.9.1): Extracting archive
  - Installing jane-php/automapper-bundle (v7.5.3): Extracting archive
  - Installing jacquesbh/eater (v2.0.4): Extracting archive
  - Installing monsieurbiz/sylius-search-plugin (dev-master): Symlinking from ../..

So I suggest to keep the require at this time with the warning in the README, and we will manage it for next version of the plugin : #214

@maximehuran maximehuran requested a review from delyriand July 18, 2024 07:25
@maximehuran maximehuran merged commit 613f08f into monsieurbiz:master Jul 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 2.1 doesn't support new Sylius version 1.13
4 participants