- Bundles, container extensions and bundles configurations were made final and can't be extended anymore, follow Symfony best practices and do not extend them.
- Route
sylius_admin_order_shipment_ship
has been added to have specific end point only for updating via http PUT method andsylius_admin_partial_shipment_ship
route is only for rendering the form. - Rename any
sylius_admin_address_log_entry_index
usages tosylius_admin_partial_log_entry_index
.
- All api routes are prefixed with version number. For example route:
/api/customers
has changed to/api/v1/customers
.
AttributeValue::$localeCode
property was added to make it translatable. Now, every attribute value has a locale code to be displayed properly in different locales. All attribute values are migrated to the new concept with migrationVersion20170109143010
. Look at this PR if you have any problems with upgrade.
-
ImageUniqueCode
andImageUniqueCodeValidator
were deleted and replaced byUniqueWithinCollectionConstraintValidator
,UniqueWithinCollectionConstraint
fromResourceBundle
. To use it replace name of constraint in constraint mapping file from:Sylius\Bundle\CoreBundle\Validator\Constraints\ImageUniqueCode
to:Sylius\Bundle\ResourceBundle\Validator\Constraints\UniqueWithinCollectionConstraint
-
Renamed
getLastNewPayment()
onOrderInterface
togetLastPayment($state)
, where$state
is target last payment state. EverygetLastNewPayment()
method should be replaced withgetLastPayment(PaymentInterface::STATE_NEW)
. -
Sylius\Component\Core\OrderProcessing\OrderTaxesProcessor
andSylius\Component\Core\Resolver\ZoneAndChannelBasedShippingMethodsResolver
have become a zone scope aware. From now, only zones with scope 'shipping' or 'all' will be considered inSylius\Component\Core\Resolver\ZoneAndChannelBasedShippingMethodsResolver
and a scope 'tax' or 'all' is required inSylius\Component\Core\OrderProcessing\OrderTaxesProcessor
. A migration file has been prepared which fill in "all" as scope for zones that didn't have it specified, so they will be resolved by new implementation. -
State resolvers have been made final. In order to change theirs behavior please decorate them or provide your own implementation.
-
Sylius\Bundle\CoreBundle\DependencyInjection\Compiler\RoutingRepositoryPass
was removed, implement it yourself. -
Method
createQueryBuilderByChannelAndTaxonSlug
fromSylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepositoryInterface
was renamed tocreateShopListQueryBuilder
and receives taxon object instead of taxon slug string as the second parameter. -
Sylius\Bundle\CoreBundle\Test\MySqlDriver
andSylius\Bundle\CoreBundle\Test\PgSqlDriver
were moved to test namespace, provide your own implementation or use Doctrin DBAL'sDoctrine\DBAL\Driver\PDOMySql\Driver
andDoctrine\DBAL\Driver\PDOPgSql\Driver
instead. -
Sylius\Component\Core\Test\Services\RandomInvoiceNumberGenerator
was moved toSylius\Component\Core\Payment\RandomInvoiceNumberGenerator
, change your usages accordingly. -
Sylius\Component\Core\Payment\RandomInvoiceNumberGenerator
andSylius\Component\Core\Payment\IdBasedInvoiceNumberGenerator
were made final, use decoration and implementSylius\Component\Core\Payment\InvoiceNumberGeneratorInterface
instead of extending them.
- Custom options for filter form types was extracted from
options
toform_options
in grid configuration.
Before:
sylius_grid:
grids:
app_order:
filters:
channel:
type: entity
options:
class: "%app.model.channel%"
fields: [channel]
After:
sylius_grid:
grids:
app_order:
filters:
channel:
type: entity
options:
fields: [channel]
form_options:
class: "%app.model.channel%"
Locale
model's$enabled
field has been removed along with all logic depending on it.
- Method
findOrdersUnpaidSince
ofSylius\Bundle\OrderBundle\Doctrine\ORM\OrderRepository
has been moved toSylius\Bundle\CoreBundle\Doctrine\ORM\OrderRepository
as it depends on Core component. If you haven't been using this method, you can remove the 'CoreBundle' dependency.
- Changed default
Payment::$state
from new to cart. - Credit Card model and all related code have been removed.
->getSource()
and->setSource(PaymentSourceInterface $source)
have been removed fromPaymentInterface
.PaymentSourceInterface
has been removed.
ProductVariant::$name
property (and corresponding getter and setter) was removed to make it translatable. Therefore,ProductVariantTranslation
was introduced with one$name
property. All product variants names are migrated to new concept with migrationVersion2016121415313
. Look at this PR if you have any problems with upgrade.ProductAssociationType::$name
property (and corresponding getter and setter) was removed to make it translatable. Therefore,ProductAssociationTypeTranslation
was introduced with one$name
property. All product association types names are migrated to new concept with migrationVersion20161219160441
. Look at this PR if you have any problems with upgrade.
- Removed
sylius_resource.resources.*.translation.fields
configuration key, it was not used at all - if causing issues, remove your configuration under it.
Service sylius.average_rating_updater
name has been changed to sylius.product_review.average_rating_updater
and service sylius.listener.review_change
name has been changed to sylius.listener.product_review_change
These services will be generated automatically based on subject name.
-
Sylius\Bundle\UiBundle\Menu\AbstractMenuBuilder
was removed, you should add the following code to classes previously extending it:use Knp\Menu\FactoryInterface; use Symfony\Component\EventDispatcher\EventDispatcher; /** * @var FactoryInterface */ private $factory; /** * @var EventDispatcher */ private $eventDispatcher; /** * @param FactoryInterface $factory * @param EventDispatcher $eventDispatcher */ public function __construct(FactoryInterface $factory, EventDispatcher $eventDispatcher) { $this->factory = $factory; $this->eventDispatcher = $eventDispatcher; }
Also
sylius.menu_builder
service was removed, you should add the following code to services previously extending it:<argument type="service" id="knp_menu.factory" /> <argument type="service" id="event_dispatcher" />
sylius_admin_dashboard_redirect
route was removed, usesylius_admin_dashboard
instead.
Some change has been made to app/config/security.yml
firewalls:
admin:
form_login:
csrf_token_generator: security.csrf.token_manager
csrf_parameter: _csrf_admin_security_token
csrf_token_id: admin_authenticate
remember_me:
secret: "%secret%"
path: /admin
name: APP_ADMIN_REMEMBER_ME
lifetime: 31536000 //custom lifetime
remember_me_parameter: _remember_me
shop:
form_login:
csrf_token_generator: security.csrf.token_manager
csrf_parameter: _csrf_shop_security_token
csrf_token_id: shop_authenticate
remember_me:
secret: "%secret%"
name: APP_SHOP_REMEMBER_ME
lifetime: 31536000
remember_me_parameter: _remember_me
access_control:
- { path: "^/_partial.*", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: "^/_partial.*", role: ROLE_NO_ACCESS }
- { path: "^/admin/_partial.*", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: "^/admin/_partial.*", role: ROLE_NO_ACCESS }
From now one you need to pass csrf token to your login-check request so you need to add <input type="hidden" value={{ csrf_token('csrf_token_id') }} name="csrf_parameter">
into your login form.
Example input <input type="hidden" name="_csrf_admin_security_token" value="{{ csrf_token('admin_authenticate') }}">
The remember me feature did not work properly due to missing additional configuration.
Sylius\Behat\Page\Admin\Crud\IndexPage
,Sylius\Behat\Page\Admin\Crud\CreatePage
,Sylius\Behat\Page\Admin\Crud\UpdatePage
now accepts route name instead of resource name.