Skip to content

Commit

Permalink
refactor #12469 Extract sylius/admin-api-bundle out of Sylius Core (b…
Browse files Browse the repository at this point in the history
…ut keep it installed by default in existing minor releases) (pamil)

This PR was merged into the 1.8 branch.

Discussion
----------

**Why?**

 - Two packages required by `sylius/admin-api-bundle` are blocking Sylius from upgrading to PHP 8.
 - We're rolling out v2 of the API, for both storefront and admin usage, which are getting more and more mature.
 - This bundle will be extracted as for Sylius v1.8 (so that we can still include bugfixes) and removed from the default installation in Sylius v1.10. However, it will be relatively simple to add it back to v1.10 if you're still using it - composer require and that's it.
 - Admin API is not as widely used as Shop API anyway.

Reference: #12298

Commits
-------

8aa834a Extract sylius/admin-api-bundle
5c2ba7b Explicitly set version in composer.json
de5884e Add LazyOption::getOneBy backported from 1.9, since newer AdminApiBundle depends on it
856a0f4 Add conflict with jms/serializer-bundle 3.9.0
8bd822b Lock on Admin API Bundle v1.8
  • Loading branch information
pamil committed Apr 7, 2021
2 parents 8be76a3 + 8bd822b commit 03546d5
Show file tree
Hide file tree
Showing 135 changed files with 48 additions and 5,008 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

-
name: Validate composer.json
run: composer validate --strict
run: composer validate --strict --no-check-version
if: always() && steps.end-of-setup.outcome == 'success'

-
Expand Down
7 changes: 7 additions & 0 deletions CONFLICTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ references related issues.

References: https://github.com/doctrine/DoctrineBundle/issues/1305

- `jms/serializer-bundle:3.9`:

This version automatically registered DocBlockDriver, which is always turned on, while docblocks used in our code are not usable with it. Sample error:
`Can't use incorrect type object for collection in Doctrine\ORM\PersistentCollection:owner`

References: https://github.com/schmittjoh/JMSSerializerBundle/issues/844

- `symfony/serializer:4.4.19|5.2.2`:

These versions of Symfony Serializer introduces a bug with trying to access some private properties that don't have getters.
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "sylius/sylius",
"type": "library",
"version": "v1.8.11-dev",
"description": "E-Commerce platform for PHP, based on Symfony framework.",
"homepage": "https://sylius.com",
"license": "MIT",
Expand Down Expand Up @@ -54,6 +55,7 @@
"swiftmailer/swiftmailer": "^6.2",
"sylius-labs/association-hydrator": "^1.1",
"sylius-labs/doctrine-migrations-extra-bundle": "^0.1.3",
"sylius/admin-api-bundle": "~1.8.0",
"sylius/fixtures-bundle": "^1.6.1",
"sylius/grid": "^1.7.5",
"sylius/grid-bundle": "^1.7.5",
Expand Down Expand Up @@ -158,6 +160,7 @@
"api-platform/core": "^2.6",
"doctrine/doctrine-bundle": "2.3.0",
"doctrine/inflector": "^1.4",
"jms/serializer-bundle": "3.9.0",
"laminas/laminas-code": "^4.0.0",
"symfony/doctrine-bridge": "4.4.16",
"symfony/polyfill-mbstring": "^1.22.0",
Expand Down Expand Up @@ -251,7 +254,6 @@
"spec\\Sylius\\Component\\Taxonomy\\": "src/Sylius/Component/Taxonomy/spec/",
"spec\\Sylius\\Component\\User\\": "src/Sylius/Component/User/spec/",
"spec\\Sylius\\Bundle\\AddressingBundle\\": "src/Sylius/Bundle/AddressingBundle/spec/",
"spec\\Sylius\\Bundle\\AdminApiBundle\\": "src/Sylius/Bundle/AdminApiBundle/spec/",
"spec\\Sylius\\Bundle\\AdminBundle\\": "src/Sylius/Bundle/AdminBundle/spec/",
"spec\\Sylius\\Bundle\\ApiBundle\\": "src/Sylius/Bundle/ApiBundle/spec/",
"spec\\Sylius\\Bundle\\AttributeBundle\\": "src/Sylius/Bundle/AttributeBundle/spec/",
Expand Down
1 change: 0 additions & 1 deletion phpspec.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ suites:

AddressingBundle: { namespace: Sylius\Bundle\AddressingBundle, psr4_prefix: Sylius\Bundle\AddressingBundle, spec_path: src/Sylius/Bundle/AddressingBundle, src_path: src/Sylius/Bundle/AddressingBundle }
AdminBundle: { namespace: Sylius\Bundle\AdminBundle, psr4_prefix: Sylius\Bundle\AdminBundle, spec_path: src/Sylius/Bundle/AdminBundle, src_path: src/Sylius/Bundle/AdminBundle }
AdminApiBundle: { namespace: Sylius\Bundle\AdminApiBundle, psr4_prefix: Sylius\Bundle\AdminApiBundle, spec_path: src/Sylius/Bundle/AdminApiBundle, src_path: src/Sylius/Bundle/AdminApiBundle }
ApiBundle: { namespace: Sylius\Bundle\ApiBundle, psr4_prefix: Sylius\Bundle\ApiBundle, spec_path: src/Sylius/Bundle/ApiBundle, src_path: src/Sylius/Bundle/ApiBundle }
AttributeBundle: { namespace: Sylius\Bundle\AttributeBundle, psr4_prefix: Sylius\Bundle\AttributeBundle, spec_path: src/Sylius/Bundle/AttributeBundle, src_path: src/Sylius/Bundle/AttributeBundle }
ChannelBundle: { namespace: Sylius\Bundle\ChannelBundle, psr4_prefix: Sylius\Bundle\ChannelBundle, spec_path: src/Sylius/Bundle/ChannelBundle, src_path: src/Sylius/Bundle/ChannelBundle }
Expand Down
2 changes: 0 additions & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<directory name="src/Sylius/Bundle/AddressingBundle/spec" />
<directory name="src/Sylius/Bundle/AddressingBundle/test" />
<directory name="src/Sylius/Bundle/AddressingBundle/Tests" />
<directory name="src/Sylius/Bundle/AdminApiBundle/spec" />
<directory name="src/Sylius/Bundle/AdminApiBundle/Tests" />
<directory name="src/Sylius/Bundle/ApiBundle/spec" />
<directory name="src/Sylius/Bundle/ApiBundle/Tests" />
<directory name="src/Sylius/Bundle/AdminBundle/spec" />
Expand Down
5 changes: 0 additions & 5 deletions src/Sylius/Bundle/AdminApiBundle/.gitignore

This file was deleted.

86 changes: 0 additions & 86 deletions src/Sylius/Bundle/AdminApiBundle/Command/CreateClientCommand.php

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 03546d5

Please sign in to comment.