Magento Semantic Versioning Checker

Overview

Magento Semantic Version Checker

Installation

  • git clone [email protected]:magento/magento-semver.git
  • cd magento-semver
  • composer install

Usage

  • php bin/svc --help

Commands

  • php bin/svc compare - Compare a set of files to determine what semantic versioning change needs to be done.
  • php bin/svc update-breaking-changes - Update the file with a list of backward incompatible changes between two sources.

Releases & Versioning

Releases

  • Magento-semver development should happen against the develop branch.
  • New releases will shipped monthly. However, new releases will only occur if the develop branch has diverged from the master branch.
  • If a hot-fix needs to be applied, a new release may be cut at any time. If this happens, the release cycle does not change.

Versioning

  • Versions will be handled via GitHub Tags.
  • Only MAJOR versions, as understood by the Semantic Versioning specification, are allowed; e.g.: increasing from version 2.0.0 to version 3.0.0.
  • With each new version, the composer.json file must be updated to match the new target version before creating a tag.
  • After a new version is released, magento-semver will be packaged and published to repo.magento.com for consumption.

Tests

  • vendor/bin/phpunit -c tests/Unit/phpunit.xml.dist
Comments
  • False positive - M201 Virtual Type was changed

    False positive - M201 Virtual Type was changed

    As part of reviewing https://github.com/magento/magento2/pull/26948, I found false positive. In case if we'll remove \ for type of virtual type - we have SVC failure, while basically, we didn't change the type for this virtual type. image image

    The whole diff was following:

    diff --git a/app/code/Magento/Elasticsearch/etc/di.xml b/app/code/Magento/Elasticsearch/etc/di.xml
    index edec07cb5d51..0ee48188eb06 100644
    --- a/app/code/Magento/Elasticsearch/etc/di.xml
    +++ b/app/code/Magento/Elasticsearch/etc/di.xml
    @@ -194,7 +194,7 @@
         <type name="Magento\AdvancedSearch\Model\Client\ClientResolver">
             <arguments>
                 <argument name="clientFactories" xsi:type="array">
    -                <item name="elasticsearch5" xsi:type="string">\Magento\Elasticsearch\Elasticsearch5\Model\Client\ElasticsearchFactory</item>
    +                <item name="elasticsearch5" xsi:type="string">Magento\Elasticsearch\Elasticsearch5\Model\Client\ElasticsearchFactory</item>
                 </argument>
                 <argument name="clientOptions" xsi:type="array">
                     <item name="elasticsearch5" xsi:type="string">Magento\Elasticsearch\Model\Config</item>
    @@ -341,7 +341,7 @@
         </type>
         <type name="Magento\Elasticsearch\SearchAdapter\Dynamic\DataProvider">
             <arguments>
    -            <argument name="indexerId" xsi:type="const">\Magento\CatalogSearch\Model\Indexer\Fulltext::INDEXER_ID</argument>
    +            <argument name="indexerId" xsi:type="const">Magento\CatalogSearch\Model\Indexer\Fulltext::INDEXER_ID</argument>
             </arguments>
         </type>
         <type name="Magento\Config\Model\Config\TypePool">
    @@ -371,48 +371,48 @@
         <type name="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver">
             <arguments>
                 <argument name="items" xsi:type="array">
    -                <item name="notEav" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item>
    -                <item name="special" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item>
    -                <item name="price" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item>
    -                <item name="categoryName" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item>
    -                <item name="position" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item>
    -                <item name="default" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver</item>
    +                <item name="notEav" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item>
    +                <item name="special" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item>
    +                <item name="price" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item>
    +                <item name="categoryName" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item>
    +                <item name="position" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item>
    +                <item name="default" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver</item>
                 </argument>
             </arguments>
         </type>
    -    <virtualType name="elasticsearch5FieldNameResolver" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver">
    +    <virtualType name="elasticsearch5FieldNameResolver" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver">
             <arguments>
                 <argument name="items" xsi:type="array">
    -                <item name="notEav" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item>
    -                <item name="special" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item>
    -                <item name="price" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item>
    -                <item name="categoryName" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item>
    -                <item name="position" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item>
    +                <item name="notEav" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item>
    +                <item name="special" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item>
    +                <item name="price" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item>
    +                <item name="categoryName" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item>
    +                <item name="position" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item>
                     <item name="default" xsi:type="object">elasticsearch5FieldNameDefaultResolver</item>
                 </argument>
             </arguments>
         </virtualType>
         <virtualType name="elasticsearch5FieldNameDefaultResolver" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver">
             <arguments>
    -            <argument name="fieldTypeResolver" xsi:type="object">\Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver</argument>
    +            <argument name="fieldTypeResolver" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver</argument>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
             </arguments>
         </virtualType>
         <type name="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver">
             <arguments>
                 <argument name="items" xsi:type="array">
    -                <item name="integer" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\IntegerType</item>
    -                <item name="datetime" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DateTimeType</item>
    -                <item name="float" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\FloatType</item>
    -                <item name="default" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DefaultResolver</item>
    +                <item name="integer" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\IntegerType</item>
    +                <item name="datetime" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DateTimeType</item>
    +                <item name="float" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\FloatType</item>
    +                <item name="default" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DefaultResolver</item>
                 </argument>
             </arguments>
         </type>
         <type name="Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver">
             <arguments>
                 <argument name="items" xsi:type="array">
    -                <item name="keyword" xsi:type="object">\Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\KeywordType</item>
    -                <item name="integer" xsi:type="object">\Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\IntegerType</item>
    +                <item name="keyword" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\KeywordType</item>
    +                <item name="integer" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\IntegerType</item>
                     <item name="datetime" xsi:type="object">elasticsearch5FieldTypeDateTimeResolver</item>
                     <item name="float" xsi:type="object">elasticsearch5FieldTypeFloatResolver</item>
                     <item name="default" xsi:type="object">elasticsearch5FieldTypeDefaultResolver</item>
    @@ -422,8 +422,8 @@
         <type name="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\CompositeFieldProvider">
             <arguments>
                 <argument name="providers" xsi:type="array">
    -                <item name="static" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\StaticField</item>
    -                <item name="dynamic" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\DynamicField</item>
    +                <item name="static" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\StaticField</item>
    +                <item name="dynamic" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\DynamicField</item>
                 </argument>
             </arguments>
         </type>
    @@ -435,16 +435,16 @@
                 </argument>
             </arguments>
         </virtualType>
    -    <virtualType name="elasticsearch5StaticFieldProvider" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\StaticField">
    +    <virtualType name="elasticsearch5StaticFieldProvider" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\StaticField">
             <arguments>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
                 <argument name="indexTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldIndex\Converter</argument>
                 <argument name="fieldIndexResolver" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldIndex\IndexResolver</argument>
    -            <argument name="fieldTypeResolver" xsi:type="object">\Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver</argument>
    +            <argument name="fieldTypeResolver" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver</argument>
                 <argument name="fieldNameResolver" xsi:type="object">elasticsearch5FieldNameResolver</argument>
             </arguments>
         </virtualType>
    -    <virtualType name="elasticsearch5DynamicFieldProvider" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\DynamicField">
    +    <virtualType name="elasticsearch5DynamicFieldProvider" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\DynamicField">
             <arguments>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
                 <argument name="indexTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldIndex\Converter</argument>
    @@ -460,17 +460,17 @@
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
             </arguments>
         </type>
    -    <virtualType name="elasticsearch5FieldTypeDateTimeResolver" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DateTimeType">
    +    <virtualType name="elasticsearch5FieldTypeDateTimeResolver" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DateTimeType">
             <arguments>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
             </arguments>
         </virtualType>
    -    <virtualType name="elasticsearch5FieldTypeFloatResolver" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\FloatType">
    +    <virtualType name="elasticsearch5FieldTypeFloatResolver" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\FloatType">
             <arguments>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
             </arguments>
         </virtualType>
    -    <virtualType name="elasticsearch5FieldTypeDefaultResolver" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DefaultResolver">
    +    <virtualType name="elasticsearch5FieldTypeDefaultResolver" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\DefaultResolver">
             <arguments>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
             </arguments>
    @@ -490,7 +490,7 @@
             <arguments>
                 <argument name="converter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldIndex\Converter</argument>
                 <argument name="fieldTypeConverter" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Converter</argument>
    -            <argument name="fieldTypeResolver" xsi:type="object">\Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver</argument>
    +            <argument name="fieldTypeResolver" xsi:type="object">Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\CompositeResolver</argument>
             </arguments>
         </type>
         <type name="Magento\Search\Model\Search\PageSizeProvider">
    diff --git a/app/code/Magento/Elasticsearch6/etc/di.xml b/app/code/Magento/Elasticsearch6/etc/di.xml
    index e60f331f9ee8..388561d063fc 100644
    --- a/app/code/Magento/Elasticsearch6/etc/di.xml
    +++ b/app/code/Magento/Elasticsearch6/etc/di.xml
    @@ -32,10 +32,10 @@
         <type name="Magento\AdvancedSearch\Model\Client\ClientResolver">
             <arguments>
                 <argument name="clientFactories" xsi:type="array">
    -                <item name="elasticsearch6" xsi:type="string">\Magento\Elasticsearch6\Model\Client\ElasticsearchFactory</item>
    +                <item name="elasticsearch6" xsi:type="string">Magento\Elasticsearch6\Model\Client\ElasticsearchFactory</item>
                 </argument>
                 <argument name="clientOptions" xsi:type="array">
    -                <item name="elasticsearch6" xsi:type="string">\Magento\Elasticsearch\Model\Config</item>
    +                <item name="elasticsearch6" xsi:type="string">Magento\Elasticsearch\Model\Config</item>
                 </argument>
             </arguments>
         </type>
    @@ -141,15 +141,15 @@
                 </argument>
             </arguments>
         </type>
    -    <virtualType name="elasticsearch6FieldNameResolver" type="\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver">
    +    <virtualType name="elasticsearch6FieldNameResolver" type="Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CompositeResolver">
             <arguments>
                 <argument name="items" xsi:type="array">
    -                <item name="notEav" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item>
    -                <item name="special" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item>
    -                <item name="price" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item>
    -                <item name="categoryName" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item>
    -                <item name="position" xsi:type="object">\Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item>
    -                <item name="default" xsi:type="object">\Magento\Elasticsearch6\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver</item>
    +                <item name="notEav" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\NotEavAttribute</item>
    +                <item name="special" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\SpecialAttribute</item>
    +                <item name="price" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Price</item>
    +                <item name="categoryName" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\CategoryName</item>
    +                <item name="position" xsi:type="object">Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\Position</item>
    +                <item name="default" xsi:type="object">Magento\Elasticsearch6\Model\Adapter\FieldMapper\Product\FieldProvider\FieldName\Resolver\DefaultResolver</item>
                 </argument>
             </arguments>
         </virtualType>
    
    Progress: done 
    opened by ihor-sviziev 5
  • Update composer dependencies and unit tests

    Update composer dependencies and unit tests

    Description

    • updated php to ^7.3||^8.0
    • updated phpunit/phpunit to ^9.5
    • updated nikic/php-parser to ^4.10
    • updated phpstan/phpdoc-parser to ^0.5
    • replaced zendframework/zend-stdlib with laminas/laminas-stdlib as Zend packages are deprecated
    • sorted composer dependencies :)
    • updated php to 7.3 in .github/workflows/php.yml

    Fixed Issues

    1. Fixes https://github.com/magento/magento2/issues/32872

    Contribution checklist (*)

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [x] All new or changed code is covered with unit/integration tests (if applicable)
    • [x] All automated tests passed successfully (all builds are green)
    opened by drpayyne 4
  • EQPS-260: Open Source Readiness

    EQPS-260: Open Source Readiness

    • Add the OSL-3 license as a LICENSE file in the root of the repo.
    • Add Magento's code of conduct as a CODE_OF_CONDUCT.md file to the repo.
    • All source code (other than machine generated code) should have an OSL-compatible source code header.
    • Add contribution guidelines for first-timers as a CONTRIBUTING.md file to the repo.
    opened by roribio 4
  • Eqps 213 remove framework dependency

    Eqps 213 remove framework dependency

    Removed dependency on magento/framework

    • Reimplemented classes/functions required in src
    • add framework classes to src/Helper for unittest dependencies on magento/framework
    • removed magento/framework from composer.json
    • added zendframework/zend-stdlib as dependency at version used by magento/framework
    opened by magterskine 4
  • False positive - Method return typing changed when class in the same namespace

    False positive - Method return typing changed when class in the same namespace

    I've seen few times when SVC check was complaining about changed return type, when actually it wasn't.

    Example taken from https://github.com/magento/magento2/pull/27980 here https://github.com/magento/magento2/pull/27980/files#diff-fe16896d208c3ab2d52fccbbf7a5eaebR113:

    diff --git a/lib/internal/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php
    index 075aa6b24faa..4f79b0d314f1 100644
    --- a/lib/internal/Magento/Framework/DB/Select.php
    +++ b/lib/internal/Magento/Framework/DB/Select.php
    @@ -7,6 +7,7 @@
     
     use Magento\Framework\App\ResourceConnection;
     use Magento\Framework\DB\Adapter\AdapterInterface;
    +use Magento\Framework\DB\Sql\Expression;
     
     /**
      * Class for SQL SELECT generation and results.
    @@ -107,19 +108,19 @@ public function __construct(
          * </code>
          *
          * @param string $cond The WHERE condition.
    -     * @param string|array|null $value OPTIONAL An optional single or array value to quote into the condition.
    -     * @param string|int|null $type OPTIONAL The type of the given value
    -     * @return \Magento\Framework\DB\Select
    +     * @param array|null|int|string|float|Expression|Select|\DateTimeInterface $value The value to quote.
    +     * @param int|string|null $type OPTIONAL SQL datatype of the given value e.g. Zend_Db::FLOAT_TYPE or "INT"
    +     * @return Select
          */
         public function where($cond, $value = null, $type = null)
         {
             if ($value === null && $type === null) {
                 $value = '';
    -        } elseif ($type == self::TYPE_CONDITION) {
    +        } elseif ((string)$type === self::TYPE_CONDITION) {
                 $type = null;
             }
             if (is_array($value)) {
    -            $cond = $this->getConnection()->quoteInto($cond, $value);
    +            $cond = $this->getConnection()->quoteInto($cond, $value, $type);
                 $value = null;
             }
             return parent::where($cond, $value, $type);
    

    Actual result

    Result is following: image

    Level | Target/Location | Code/Reason -- | -- | -- | MAJOR | Magento\Framework\DB\Select::where/lib/internal/Magento/Framework/DB/Select.php:115 | M120 [public] Method return typing changed.

    Expected result

    Return type isn't changed.

    Test complaining that return type has changed, but it actually not, as class Magento\Framework\DB\Select actually is THE SAME class as Select as it in the current namespace.

    Additional examples: https://github.com/magento/magento2/pull/27129

    • return type was replaced to import with alias - https://github.com/magento/magento2/pull/27129/files#diff-9a6bbd63a553b9d289b089830857e6d7L195

    https://github.com/magento/magento2/pull/26355#issuecomment-578045167

    Progress: done Priority: P1 Severity: S2 needs update 
    opened by ihor-sviziev 3
  • Added code style checks

    Added code style checks

    Description (*)

    • Added code style checks
    • Fixed code style in code and tests

    Contribution checklist (*)

    • [ ] Pull request has a meaningful description of its purpose
    • [ ] All commits are accompanied by meaningful commit messages
    • [ ] All new or changed code is covered with unit/integration tests (if applicable)
    • [ ] All automated tests passed successfully (all builds are green)
    opened by slavvka 3
  • [Pyrrans] AC-3208: updated symfony/console to the latest version

    [Pyrrans] AC-3208: updated symfony/console to the latest version

    Description (*)

    This pull request (PR) provides updated symfony/console to the latest version 5.4.9

    Fixed Issues (if relevant)

    1. Fixes AC-3208

    Contribution checklist (*)

    • [ ] Pull request has a meaningful description of its purpose
    • [ ] All commits are accompanied by meaningful commit messages
    • [ ] All new or changed code is covered with unit/integration tests (if applicable)
    • [ ] All automated tests passed successfully (all builds are green)
    Progress: review partners-contribution Partner: Atwix 
    opened by anzin 2
  • Add support php 8.1 in composer

    Add support php 8.1 in composer

    Description (*)

    Added PHP 8.1 compatibility to magento/semver

    Fixed Issues (if relevant)

    1. magento/magento2#34538

    Contribution checklist (*)

    • [ ] Pull request has a meaningful description of its purpose
    • [ ] All commits are accompanied by meaningful commit messages
    • [ ] All new or changed code is covered with unit/integration tests (if applicable)
    • [ ] All automated tests passed successfully (all builds are green)
    Progress: done partners-contribution Partner: Atwix 
    opened by anzin 2
  • Has been added compatibility with PHP 8 to `magento/semver`

    Has been added compatibility with PHP 8 to `magento/semver`

    Description (*)

    This pull request (PR) provides compatibility current project with PHP 8.

    Fixed Issues (if relevant)

    1. Fixes magento/magento2#32872

    Contribution checklist (*)

    • [ ] Pull request has a meaningful description of its purpose
    • [ ] All commits are accompanied by meaningful commit messages
    • [ ] All new or changed code is covered with unit/integration tests (if applicable)
    • [ ] All automated tests passed successfully (all builds are green)
    Progress: done 
    opened by andrewbess 2
  • [False positive] Method parameter typing added

    [False positive] Method parameter typing added

    Hi,

    This is a follow-up on the https://github.com/magento/magento2/pull/33353#issuecomment-874976048.

    While working on https://github.com/magento/magento2/pull/33353, there were added following changes:

    diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php
    index dae830dd889d..cb23deb0be4a 100644
    --- a/lib/internal/Magento/Framework/Escaper.php
    +++ b/lib/internal/Magento/Framework/Escaper.php
    @@ -289,7 +289,7 @@ public function escapeUrl($string)
          * @return string
          * @since 101.0.0
          */
    -    public function encodeUrlParam($string)
    +    public function encodeUrlParam(string $string)
         {
             return $this->getEscaper()->escapeUrl($string);
         }
    @@ -328,7 +328,7 @@ function ($matches) {
          * @return string
          * @since 101.0.0
          */
    -    public function escapeCss($string)
    +    public function escapeCss(string $string)
         {
             return $this->getEscaper()->escapeCss($string);
         }
    

    The SVC failure was failing:

    Level | Target/Location | Code/Reason -- | -- | -- MAJOR | Magento\Framework\Escaper::encodeUrlParam/lib/internal/Magento/Framework/Escaper.php:292 | V085 [public] Method parameter typing added. MAJOR | Magento\Framework\Escaper::escapeCss/lib/internal/Magento/Framework/Escaper.php:331 | V085 [public] Method parameter typing added.

    image

    Basically, adding argument type shouldn't introduce any breaking changes since PHP 7.2 (thanks to https://wiki.php.net/rfc/parameter-no-type-variance).

    Examples:

    Here are two examples that works fine

    1. w/o strict types, pass string https://3v4l.org/IBGCK
    <?php
    
    class A
    {
        public function encodeUrlParam(string $string)
        {
            echo $string;    
        }
    }
    
    class extendedA extends A
    {
        public function encodeUrlParam($string)
        {
            echo $string;
        }
    }
    
    $a = new extendedA();
    $a->encodeUrlParam('test');
    

    image

    1. with strict types, pass string https://3v4l.org/eFu0n
    <?php
    
    declare(strict_types=1);
    
    class A
    {
        public function encodeUrlParam(string $string)
        {
            echo $string;    
        }
    }
    
    class extendedA extends A
    {
        public function encodeUrlParam($string)
        {
            echo $string;
        }
    }
    
    $a = new extendedA();
    $a->encodeUrlParam('test');
    

    image

    1. w/o strict types, pass int https://3v4l.org/KDom7
    <?php
    
    class A
    {
        public function encodeUrlParam(string $string)
        {
            echo $string;    
        }
    }
    
    class extendedA extends A
    {
        public function encodeUrlParam($string)
        {
            echo $string;
        }
    }
    
    $a = new extendedA();
    $a->encodeUrlParam(1);
    

    image

    1. with strict types, pass int https://3v4l.org/cGn61
    <?php
    
    declare(strict_types=1);
    
    class A
    {
        public function encodeUrlParam(string $string)
        {
            echo $string;    
        }
    }
    
    class extendedA extends A
    {
        public function encodeUrlParam($string)
        {
            echo $string;
        }
    }
    
    $a = new extendedA();
    $a->encodeUrlParam(1);
    

    image

    :exclamation: ❌ Note: it doesn't work like that for return types https://3v4l.org/ti9uU

    <?php
    
    class A
    {
        public function encodeUrlParam(string $string): string
        {
            echo $string;    
        }
    }
    
    class extendedA extends A
    {
        public function encodeUrlParam($string)
        {
            echo $string;
        }
    }
    
    $a = new extendedA();
    $a->encodeUrlParam('test');
    

    image

    Progress: done 
    opened by ihor-sviziev 2
  • False positive - Method has been added

    False positive - Method has been added

    We found this issue as part of processing following PR: https://github.com/magento/magento2/pull/30001

    When we adding some get parameter and constructor wasn't overridden yet for this class - we're having following failure: image image

    Progress: done Priority: P1 Severity: S2 
    opened by ihor-sviziev 2
  • Compare to a git branch or tag

    Compare to a git branch or tag

    Following the way the original php-semver-checker project has a suggest command https://github.com/tomzx/php-semver-checker-git which will doo all calclulations against the VCS instead of having to manually checkout different versions to local folders

    Progress: ready for grooming 
    opened by barbazul 1
  • Documented ruleset

    Documented ruleset

    Description

    Documented the ruleset as discovered in the Operation classes

    Fixed Issues (if relevant)

    1. magento/magento-semver#64: Request: Add a ruleset reference

    Manual testing scenarios

    Just docs, no testing involved

    Questions or comments

    During the discovery of Operation classes I found multiple duplicated rules and some inconsistency in rule numbering. Duplicated entries were documented in these cases and no inconsistency was fixed. Let me know if I should have treated these cases in some other way

    Contribution checklist (*)

    • [x] Pull request has a meaningful description of its purpose
    • [x] All commits are accompanied by meaningful commit messages
    • [x] All new or changed code is covered with unit/integration tests (if applicable)
    • [x] All automated tests passed successfully (all builds are green)
    Progress: ready for review 
    opened by barbazul 0
  • Request: Add a ruleset reference

    Request: Add a ruleset reference

    PHP Semver Checker has one https://github.com/tomzx/php-semver-checker/blob/master/docs/Ruleset.md and is pretty handy for quickly checking before making a change.

    In most cases where there is already a version constraint set it is very inconvenient to have to make the change, then run the tool, then have to rollback parts of the work done to avoid breaking changes.

    The ruleset could be a simple md file referencing the original ruleset, specifying the few overrides and explaining all the custom Magento 2 rules being added

    Progress: PR created 
    opened by barbazul 4
  • Validate backward compatibility for Web URLs

    Validate backward compatibility for Web URLs

    As a developer I want to be notified about backward-incompatible changes to web urls.

    AC

    1. SVC indicates minor change when new controller is added
    2. SVC indicates major change when controller is removed

    Documentation: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/versioning/codebase-changes.html

    Internal ticket: MC-23011

    Progress: ready for grooming Priority: P2 
    opened by okorshenko 1
  • Integrate the custom doc tool

    Integrate the custom doc tool

    The Magento DevDocs team uses a custom doc tool (private repo) to autogenerate reference information about BICs on devdocs for each release.

    The original author of this tool is no longer with Magento and the tool has no official owner.

    This tool extends the semver tool and it would make sense to port the code for the custom doc tool to the semver tool to ensure future changes don't affect our ability to autogenerate reliable and accurate reference information for each release.

    Currently, if major changes are made to the semver tool, it could break the doc tool and make our reference information incomplete, incorrect, and unreliable.

    opened by jeff-matthews 0
  • Intigrated Magento Coding Standard

    Intigrated Magento Coding Standard

    I recommend using https://github.com/magento/magento-coding-standard as phpcs standard. Only Magento2.Functions.DiscouragedFunction can be ignored because it is a standalone tool.

    opened by larsroettig 0
Releases(10.0.0)
  • 10.0.0(Jan 19, 2022)

    What's Changed

    • A new section is added to HTML SVC report showing the level of changes made to packages in JSON and table format
    • Fixed src/Console/Command/CompareSourceCommand.php to return a code instead of exiting
    • All Operations (stored versioning changes) will now display the full filepath in the location section of the HTML tables
    • The mapping array property in the Registry class will store information about the filepath
    • Automated testing added for the HTML report
    Source code(tar.gz)
    Source code(zip)
  • 7.0.0(Oct 21, 2020)

    Added MFTF SVC to check MFTF test entities Related tickets: MQE-2195: Update WIP SVC Branch MQE-2247: Implement additional <section> and <operation> entity use cases in SVC tool MQE-2246: Implement <suite> entity use cases in SVC tool MQE-2307: Add use cases for <remove> action in svc MQE-2308: MFTF SVC report does not capture per item change details MQE-2305: Implement report-type=mftf in magento-semver to launch MFTF SVC MQE-2325: bin/svc --version to return SVC version number MQE-2329: Magento SVC does not work with nikic/php-parser version above 4.6.0 MQE-2316: MFTF SVC does not check newly added modules MQE-2211: Fix remaining issues in MFTF SVC tool

    Source code(tar.gz)
    Source code(zip)
  • 6.0.0(Jun 18, 2020)

  • 5.0.0(Mar 12, 2020)

    • Added nikic/php-parser as hard dependency in composer
    • Improved performance of DependencyMap creation.
    • Remove stms when adding ClassMethod nodes to dependency tree
    • Added better doc comments
    • Added more aggresive AbstractApiVisitor traversal termination
    • Refactored code to use switch statements
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Mar 2, 2020)

  • 3.0.0(Feb 27, 2020)

    • Update README.md: Add information about releases and versioning

    • COMOPS-908: Updating compatibility with the BIC doc generator (#25)

    • EQPS-477: SVC Enhancements (#26)

    • EQPS-477: Dynamically set the correct path for autoload.php based on the location of the ‘vendor’ folder

    • EQPS-477: Make zend-stdlib a required dependency

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Dec 13, 2019)

    • Fixed multiple PHP Notices
    • Changed files currently shows only changed files without all existing JSON files and duplicates
    • Layout changes are now displayed in the report
    • Fixed Unit tests
    • Added Bootstrap.min.css for HTML reports
    • Added .travis.yml to automatically run tests on submissions
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Dec 3, 2019)

  • 1.0.1(Nov 25, 2019)

  • 1.0.0(Nov 13, 2019)

Owner
Magento
Magento
A Telegram CC Checker Bot with hella lotta features.

SDMN CC Checker Bot A Telegram CC Checker Bot with hella lotta features. ?? Features Admin Panel Ban a user Unban a user Mute a user Unmute a user Che

iNaveen 192 Jan 8, 2023
MD5-CHECKER

MD5-Checker Install on desktop : Install XAMPP Added environment variable system path => C:\xampp\php download the script and save it in your folder o

Alex 1 Jan 9, 2022
PHP 7 Compatibility Checker

PHP 7 Compatibility Checker(php7cc) Project status The project is no longer supported. Please consider using one of the following alternatives: phan p

null 1.5k Dec 17, 2022
My personal uptime checker powered by Filament. ⚡️

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Ryan Chandler 16 Sep 7, 2022
A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2

Simple Import / Export tool A tool that allows to quickly export data from Magento 1 and Magento 2 store and import it back into Magento 2. Table data

EcomDev B.V. 51 Dec 5, 2022
This Magento 2 extension integrates EasyTranslate into Magento 2.

EasyTranslate Magento 2 Connector This Magento 2 extension integrates EasyTranslate into Magento 2. Mind that you need to have an account with EasyTra

Easytranslate ApS 0 Oct 7, 2022
Magento-Functions - A Resource of Magento Functions

Magento-Functions A Resource of Magento Functions Table of Contents Category Product User Cart Checkout General Account [Working w/ URL's] (#urls) Cat

Bryan Littlefield 28 Apr 19, 2021
Magento - Magento Community Editions

Magento Community Edition /// THIS REPOSITORY IS DEPREACTED /// 1.9.4.1 will be the last version update. Please switch over to OpenMage! Either to the

FireGento e. V. 107 Oct 17, 2022
Magento-Vagrant-Puppet-Nginx - Installs magento and a nginx server

Magento-Vagrant-Puppet-Nginx Installs Magento MySQL PHP PHP-FPM Nginx n98-magerun Setup git submodule init git submodule update vagrant up Modify pupp

Christian Münch 61 Aug 10, 2022
Docker-magento - Docker image for Magento 1.6 to 1.9

Docker image for Magento 1.x This repo creates a Docker image for Magento 1.x. Please note The primary goal of this repo is to create Docker images fo

Fu Cheng 144 Nov 18, 2022
Magento-composer-installer - Composer installer for Magento modules

!!! support the maintainer of this project via Patreon: https://www.patreon.com/Flyingmana Magento Composer Installer The purpose of this project is t

null 213 Sep 24, 2022
Chef-magento - Installs and Configures a Magento project

Description Requirements Chef 0.10.0 or higher required (for Chef environment use). Platform Debian, Ubuntu CentOS, Red Hat, Fedora Your basebox must

Inviqa 3 Jun 30, 2020
Cookbook-magento - Collection of recipes to build app stack for the Magento deployments with Chef

Magento Cookbook Collection of recipes to build app stack for the Magento deployments with Chef Installation With Berkshelf echo "cookbook 'magento',

Yevhen Viktorov 37 Sep 26, 2020
Magento-bulk - Bulk Import/Export helper scripts and CLI utilities for Magento Commerce

Magento Bulk Bulk operations for Magento. Configuration Copy config.php.sample to config.php and edit it. Product Attribute Management List All Attrib

Bippo Indonesia 23 Dec 20, 2022
Phpcs-magento-rules - A set of PHPCS rules used by made.com when hacking Magento

Made.com PHPCS Magento Rules A set of PHPCS rules used by made.com when hacking Magento. Pre-Requisites PHPCS Installation Short Version Clone this re

Made.com Tech Team 26 Jun 3, 2020
This Magento extension provides a Real Full Page Caching for Magento powered by Varnish with support of Session-Based information caching (Cart, Customer Accounts, ...) via ESI includes

This Magento extension provides a Real Full Page Caching (FPC) for Magento powered by Varnish with support of Session-Based information caching (Cart, Customer Accounts, ...) via ESI includes

Hugues Alary 95 Feb 11, 2022
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Foundation 3 Framework for Magento 1.7. Foundation styles and libraries. Magento Responsive theme. Off-canvas Left-Right sidebar columns for mobile.

Magento Foundation 3 Framework Zurb Foundation 3 framework for Magento 1.7. Magento Foundation 3 Version 1.3.0. Demo page: http://magendation.internet

Nando Boronat 62 Apr 1, 2022