Commit graph

95 commits

Author SHA1 Message Date
Rafikooo
76c8febc7a
[Admin] Deprecate unused clock argument in HubNotificationProvider 2025-12-10 20:36:17 +01:00
Rafikooo
c3407f2223
[Core] Fix Symfony 7.4 PHPStan compatibility 2025-11-28 13:05:49 +01:00
Jan Goralski
08d4f2c928
[Maintenance][Phpstan] Fix iterable value typing in bundles 2025-10-20 14:34:55 +02:00
Jan Goralski
c877a42ed5
[Maintenance][Phpstan] Extracting intentional changes marked as issues and fixing singular cases 2025-10-20 14:34:54 +02:00
Jan Goralski
6aaae22861
[Maintenance] Phpstan cleanup 2025-10-20 14:34:53 +02:00
Grzegorz Sadowski
c48adbd3b8
Exclude components tests directories from PHPStan analysis 2025-05-23 14:26:55 +02:00
mamazu
12f08e1816 Fixing phpstan native error types 2025-05-21 16:04:32 +02:00
Grzegorz Sadowski
e1b9c654fe
Narrowing return types (#18009)
| Q               | A
|-----------------|-----
| Branch?         | 2.1 <!-- see the comment below -->
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | #17963
| License         | MIT

Removing types that are impossible to reach from the return type or the
documentation.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved consistency in return values for locale and payment-related
methods, ensuring they always return the expected data type and never
null where previously possible.
- **Refactor**
- Updated method signatures to provide stricter and more predictable
return types for locale conversion, payment provision, and data
transformation logic.
- **Chores**
- Adjusted static analysis configuration to report unused return type
issues, enhancing code quality checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-21 16:00:59 +02:00
janpalen
cc8e40a7bb Fix after code review 2025-05-19 12:47:54 +02:00
janpalen
fd502c3730 Chhange configuration of tests 2025-05-15 16:02:30 +02:00
mamazu
68ecaaa33d Narrowing return types 2025-05-13 12:25:32 +02:00
Grzegorz Sadowski
ec56db022c
Fix static analysis 2025-05-13 06:39:43 +02:00
Francis Hilaire
1ffcae0b91
Add Sf6.4 exception 2025-05-12 09:44:06 +02:00
Francis Hilaire
df968f9fee
Use phpstan/extension-installer 2025-05-12 09:44:06 +02:00
Francis Hilaire
31abfe1be6
Regenerate baseline and remove 'Ignored error pattern' 2025-05-12 09:44:06 +02:00
Grzegorz Sadowski
d5f56b7790
Load Winzou State Machine configs conditionally 2024-10-15 08:26:55 +02:00
Jan Goralski
e32ffdf0b1
[Maintenance] Update config phpstan, regenerate baseline and minor fixes 2024-09-25 15:58:58 +02:00
Grzegorz Sadowski
df217d7182
Resolve conflicts between 2.0 and symfony-7 2024-09-24 08:48:32 +02:00
Grzegorz Sadowski
25fa915993
Merge branch '2.0' into symfony-7
* 2.0: (26 commits)
  Update namespaces to Resource ^1.11 in 2.0
  [CS][DX] Refactor
  [CS][DX] Refactor
  [Maintenance] Update resource changes comparison in the upgrade file
  [Maintenance] Fix LazyOption repository template covariants
  [Maintenance] Note resource namespaces changes
  [Docs] Update namespaces
  [Maintenance] Update leftover namespaces
  Cover the scenario for allowing access for only correctly logged in users
  Enable the remaining cart suites
  [Maintenance] Fix translations' duplicated validation
  [Api][Unit] Fix it_gets_all_product_variants_when_invalid_product_filter_provided test
  [Api] Replace sylius.api to sylius_api
  [Api] Cover sorting and filtration of resources
  [Behat] Refine codebase for promotion and cart contexts
  Enable dashboard and homepage suites
  Minor Product config improvement
  Enable the rest of product tests and correct order of the attribute values in the response
  Correct contract tests and behat
  Bring back non exposed ProductOptionValue
  ...
2024-09-09 09:38:50 +02:00
Grzegorz Sadowski
d333483655
Merge branch '2.0' into bootstrap-shop
* 2.0:
  Update namespaces to Resource ^1.11 in 2.0
  [CS][DX] Refactor
  [CS][DX] Refactor
  [Maintenance] Update resource changes comparison in the upgrade file
  [Maintenance] Fix LazyOption repository template covariants
  [Maintenance] Note resource namespaces changes
  [Docs] Update namespaces
  [Maintenance] Update leftover namespaces
  [Maintenance] Fix translations' duplicated validation
  [Maintenance] Fix static analysis
  [Maintenance] Update resource models FQCNs
  [Maintenance] Update FactoryInterface FQCN
  [Maintenance] Update RepositoryInterface FQCN
  [Maintenance] Bumped Sylius resource packages to ^1.11
2024-09-09 08:34:56 +02:00
Grzegorz Sadowski
bfdfa929e8
Resolve conflicts between 1.14 and 2.0 2024-09-09 07:28:58 +02:00
Jan Goralski
c56107c4e8
[Maintenance] Fix LazyOption repository template covariants 2024-09-06 13:44:46 +02:00
Grzegorz Sadowski
9db198d6fa
Resolve conflicts between 2.0 and bootstrap-shop 2024-09-04 15:19:35 +02:00
Grzegorz Sadowski
d1407d6153
Resolve conflicts between 2.0 and symfony-7 2024-09-04 13:19:19 +02:00
Jan Goralski
09c8a8bba2
[Maintenance] Fix static analysis 2024-09-04 09:10:12 +02:00
Grzegorz Sadowski
5737bb97da
Merge branch '2.0' into symfony-7
* 2.0:
  [CS][DX] Refactor
  [CS][DX] Refactor
  [CS][DX] Refactor
  [CI] Update Sylius branches in refactor workflow
  [Behat] Switch another random JS failed scenarios to Chromedriver
  [Behat] Switch another random JS failed scenarios to Chromedriver
  [Behat] Switch random JS failed scenarios to Chromedriver
  [PHPStan] Temporarily ignore errors with ResourceBundle 1.11 to fix static analysis
  Minor improvements in PHPStan configuration
  [Taxonomy] Fix Taxon spec
  [PHPStan] Support both sylius/resource-bundle 1.10 and 1.11
  [CS][DX] Refactor
2024-09-03 07:41:36 +02:00
Grzegorz Sadowski
be8f2e912c
Merge branch '2.0' into bootstrap-shop
* 2.0:
  [PHPStan] Temporarily ignore errors with ResourceBundle 1.11 to fix static analysis
2024-09-02 10:14:01 +02:00
Grzegorz Sadowski
3978abf67e
Merge branch '2.0' into api-platform-3
* 2.0:
  [PHPStan] Temporarily ignore errors with ResourceBundle 1.11 to fix static analysis
2024-09-02 10:13:42 +02:00
Grzegorz Sadowski
b5eb47b5a3 [PHPStan] Temporarily ignore errors with ResourceBundle 1.11 to fix static analysis 2024-09-02 10:10:38 +02:00
Grzegorz Sadowski
612397fde9
Merge branch '2.0' into api-platform-3
* 2.0:
  Minor improvements in PHPStan configuration
  [Taxonomy] Fix Taxon spec
  [PHPStan] Support both sylius/resource-bundle 1.10 and 1.11
2024-09-02 08:39:46 +02:00
Grzegorz Sadowski
79cfff73e9
Merge branch '2.0' into bootstrap-shop
* 2.0:
  Minor improvements in PHPStan configuration
  [Taxonomy] Fix Taxon spec
  [PHPStan] Support both sylius/resource-bundle 1.10 and 1.11
2024-09-02 08:39:05 +02:00
Grzegorz Sadowski
446d158d09
Merge branch '1.14' into 2.0
* 1.14:
  Minor improvements in PHPStan configuration
  [Taxonomy] Fix Taxon spec
  [PHPStan] Support both sylius/resource-bundle 1.10 and 1.11
2024-09-02 08:37:58 +02:00
Grzegorz Sadowski
597fafc33d
Minor improvements in PHPStan configuration 2024-09-02 07:22:25 +02:00
Rafikooo
77ca7f4afe
[PHPStan] Support both sylius/resource-bundle 1.10 and 1.11 2024-08-30 11:07:07 +02:00
Loïc Frémont
074d512ed2 Fix PHPStan error 2024-08-29 09:54:25 +02:00
Wojdylak
0a7d8ddeeb [Shop] Cart Summary 2024-08-23 15:12:26 +02:00
Grzegorz Sadowski
25a3e77281
Merge branch '2.0' into api-platform-3
* 2.0: (547 commits)
  [Admin][UX] Filter translatable autocomplete results based on current locale [Admin][DX] Extract translatable autocomplete processing to a separate form type
  [Behat] Add possibility to accepting null as value in response checker
  [Maintenance] Enable non-UI tests in CI
  Fixes after CR
  Changes after CR
  [Admin][Product] Enable and fix tests
  [Admin][Product] Add view in store button
  Remove final from the Zone's form component
  Review fixes
  [Admin][UI] Add error indicators for form tabs and accordions
  [Admin][Taxon] Rename FormImageElement to ImageFormElement
  [Admin][Taxon] Split media more granularly
  [Admin][Taxon] Remove unnecessary code
  [Taxon][Behat] Extract management of image to separate form element.
  [Behat] Extract waitForFormUpdate function to CrudFormElement
  [Behat] Submit live component before submitting the form
  [Admin][Taxon][Image] Enable behat tests
  [Admin][Taxon] Implements media management
  [Admin][Product][Inventory] Enable behat tests
  [Admin][Zone] Move FormComponent
  ...
2024-05-20 12:36:43 +02:00
Jacob Tobiasz
32e2ccaa33 Update PHPStan ignore rules for Twig components 2024-05-13 15:05:26 +02:00
Jacob Tobiasz
ea30efbd6e
Exclude reporting the unused getDataModelValue() method 2024-04-09 15:49:42 +02:00
Jan Goralski
b3fa33432c
Resolve conflicts between 2.0 and bootstrap-admin-panel 2024-04-05 12:59:58 +02:00
Grzegorz Sadowski
d13ebb94d8
Merge branch '2.0' into api-platform-3
* 2.0: (776 commits)
  Add missing validation for the customers first and last name
  [CS][DX] Refactor
  Bring back all Sylius' state machines to Winzou
  Add overriding the Resource's state machine with the one from the Sylius abstraction
  Add missing locales to contract test
  [Taxon][Behat] validate translations with unexisting locales
  [ShippingMethod][Behat] validate translations with unexisting locales
  [Promotion][Behat] validate translations with unexisting locales
  [Product][Behat] validate translations with unexisting locales
  [PaymentMethod][Behat] validate translations with unexisting locales
  Validate all translatable objects for unexisiting locales
  Validate customer's password reset
  Validate customer creation and edit
  Make the validation trait more generic
  [Api] Change namespace of TaxonImagesTest class
  [Api] Remove _response suffix
  [Behat] Minor improvments of viewing_taxon_image scenario
  [Api][ProductImage] Add https prefix check
  [Api][Admin] Allow using float for ratio in exchange rate
  SYL-3329 Fix behat test for SyliusPayPalPlugin
  ...
2024-03-29 14:49:47 +01:00
Jacob Tobiasz
81678d8ff2
Resolve conflicts between 1.13 and 2.0 2024-03-22 15:26:12 +01:00
Jan Goralski
bfe31543db
[Maintenance] Ignore stan errors after ApiPlatform patch 2024-03-19 09:10:22 +01:00
Jacob Tobiasz
96dfe45e42
Update phpstan.neon.dist file 2024-03-14 09:59:28 +01:00
Grzegorz Sadowski
ae9ba0fe30
Merge branch '2.0' into api-platform-3
* 2.0: (172 commits)
  [Admin] Change name of official support section in menu and adjust translations
  Add all translations & change label
  Add business support CTA to admin panel
  [PromotionBundle] Add prefix to validation groups for promotion action/rule
  [PromotionBundle][PromotionRule] Add available type to validation message
  [PromotionBundle][PromotionAction] Add available type to validation message
  Update upgrade file
  [PromotionBundle] Split PromotionRuleValidator to PromotionRuleGroupValidator and PromotionRuleTypeValidator
  [PromotionBundle] Split PromotionActionValidator to PromotionActionGroupValidator and PromotionActionTypeValidator
  Add prefix sylius_ to validation groups
  Update upgrade file
  [PromotionBundle] Remove constraints from FormType to avoid double constraints
  [PromotionBundle] Move logic from PromotionRuleGroupValidator to PromotionRuleValidator
  [PromotionBundle] Move logic from PromotionActionGroupValidator to PromotionActionValidator
  [PromotionBundle] Add parameters validation groups for promotion action and promotion rule
  [ECS] Apply types order changes
  [ECS] Add union types ordering rule
  [ECS] Apply ecs fixes
  [ChannelsTest] use inArray to check locales
  [ApiBundle] Add contract tests for ProductTaxon resource
  ...
2023-12-15 14:45:38 +01:00
Jacob Tobiasz
e2cec8b0a0
Resolve conflicts between 1.13 and 2.0 2023-12-06 17:42:41 +01:00
Jan Goralski
7b931b8348
[DX] Ignore missing return of getId model methods and update baseline 2023-12-05 13:27:44 +01:00
Grzegorz Sadowski
3a110eaa56
Merge branch '2.0' into api-platform-3
* 2.0:
  [ShipmentBundle] Add symfony workflow configuration for Shipment
  [CoreBundle] Add Shipment transition listeners
  [CoreBundle] Add symfony workflow configuration for Shipment
  Fix failing phpspec scenario on Symfony 6.3.5 and above
  Fix failing phpspec scenario on Symfony 6.3.5 and above
  Fix failing phpspec scenario on Symfony 6.3.5 and above
  Services definition fix after review
  Fixes after review
  [Bunnyshell] Bump the PHP version to 8.2 in the php Dockerfile
  [ECS] Apply ecs fixes
  [ShippingBundle] Change deprecated Calendar class
  [Maintenance] Deprecate using `parentId` in TaxonSlugController
  Add newline to align with other public method
2023-10-06 09:25:17 +02:00
Grzegorz Sadowski
76053d1c8c
[API] Temporarily exclude ApiBundle from static analysis 2023-09-29 15:06:54 +02:00
Grzegorz Sadowski
ea1c36e1bb
Merge branch '1.13' into 2.0
* 1.13:
  [ECS] Apply ecs fixes
  [ShippingBundle] Change deprecated Calendar class
  [Maintenance] Deprecate using `parentId` in TaxonSlugController
  Add newline to align with other public method
2023-09-29 09:42:06 +02:00