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

Wrong annotation in _toOptionArray - magento/framework/Data/Collection/AbstractDb.php #12820

Closed
BrocksiNet opened this issue Dec 20, 2017 · 3 comments
Assignees
Labels
Event: dmcdindia Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@BrocksiNet
Copy link

The annotation for valueField should be @param null|string $valueField at the moment php phan thorws this as an error. And i think phan is right.

See here:
src/vendor/magento/framework/Data/Collection/AbstractDb.php

    /**
     * Overridden to use _idFieldName by default.
     *
     * @param null $valueField
     * @param string $labelField
     * @param array $additional
     * @return array
     */
    protected function _toOptionArray($valueField = null, $labelField = 'name', $additional = [])
    {
        if ($valueField === null) {
            $valueField = $this->getIdFieldName();
        }
        return parent::_toOptionArray($valueField, $labelField, $additional);
    }
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Dec 20, 2017
@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Feb 15, 2018
@magento-engcom-team
Copy link
Contributor

@bjoern-flagbit, thank you for your report.
We've acknowledged the issue and added to our backlog.

@sanjay-wagento sanjay-wagento self-assigned this May 19, 2018
@sanjay-wagento
Copy link
Contributor

I am working on this at #dmcdindia

magento-team pushed a commit that referenced this issue May 22, 2018
…amework/Data/… #15336

 - Merge Pull Request #15336 from sanjay-wagento/magento2:feature-wrong-annotation-to-option-array
 - Merged commits:
   1. e138881
magento-team pushed a commit that referenced this issue May 22, 2018
magento-team pushed a commit that referenced this issue May 22, 2018
Accepted Public Pull Requests:
 - #15372: Fixed Purchased Order Form button should visible properly (by @vgelani)
 - #15336: #12820 - Wrong annotation in _toOptionArray - magento/framework/Data/� (by @sanjay-wagento)
 - #15332: #14063 - Wrong invoice prefix in multistore setup due to default stor� (by @sanjay-wagento)
 - #15347: Fixed breadcrumb quote issue in product page #15037 (by @jignesh-baldha)
 - #15275: [fix] typo in method name _exportAddress[s]es (by @mhauri)
 - #15247: ISSUE-14747 Newsletter subscription confirmation message does not dis� (by @KaushikChavda)
 - #15089: Fix unnecessary recalculation of product list pricing (by @JeroenVanLeusden)


Fixed GitHub Issues:
 - #15334: Purchased Order Form button should visible properly (reported by @neeta-wagento) has been fixed in #15372 by @vgelani in 2.2-develop branch
   Related commits:
     1. 35b2cdf
     2. be8c6cb

 - #15037: Product Details Page breadcrumbs cause syntax error on products containing quotes (reported by @brian-labelle) has been fixed in #15347 by @jignesh-baldha in 2.2-develop branch
   Related commits:
     1. 6fcfb88
     2. bfb39b5
     3. 8e93b0d

 - #14747: Newsletter subscription confirmation message does not display after clicking link in email (reported by @tohann) has been fixed in #15247 by @KaushikChavda in 2.2-develop branch
   Related commits:
     1. 6eb96c6

 - #14941: Unnecessary recalculation of product list pricing causes huge slowdowns (reported by @paales) has been fixed in #15089 by @JeroenVanLeusden in 2.2-develop branch
   Related commits:
     1. c5536d3
@magento-engcom-team magento-engcom-team added the Progress: PR Created Indicates that Pull Request has been created to fix issue label May 26, 2018
@magento-engcom-team
Copy link
Contributor

@bjoern-flagbit Looks like the issue was fixed in the commit 67b5fe7 by @sanjay-wagento

Thank you for collaboration!

osrecio pushed a commit to osrecio/magento2 that referenced this issue May 29, 2018
gelanivishal pushed a commit to gelanivishal/magento2 that referenced this issue Jun 1, 2018
gelanivishal added a commit to gelanivishal/magento2 that referenced this issue Jun 1, 2018
[Backport] magento#12820 - Wrong annotation in _toOptionArray - magento/framework/Data/…
gelanivishal pushed a commit to gelanivishal/magento2 that referenced this issue Jun 1, 2018
gelanivishal added a commit to gelanivishal/magento2 that referenced this issue Jun 1, 2018
[Forwardport] magento#12820 - Wrong annotation in _toOptionArray - magento/framework/Data/…
magento-engcom-team added a commit that referenced this issue Jun 1, 2018
…y - magento/framework/Data/… #15578

 - Merge Pull Request #15578 from osrecio/magento2:2.3-develop-PR-port-15336
 - Merged commits:
   1. 6e3acbc
magento-engcom-team pushed a commit that referenced this issue Jun 1, 2018
magento-engcom-team added a commit that referenced this issue Jun 1, 2018
Accepted Public Pull Requests:
 - #15537: [Forwardport] Updated font-size variable and standardize #ToDo UI (by @vgelani)
 - #15578: [Forwardport] #12820 - Wrong annotation in _toOptionArray - magento/framework/Data/� (by @osrecio)
 - #15595: [Forwardport] [fix] dynamical assigned property in webapi (by @mzeis)
 - #15575: [Forwardport] [fix] typo in method name _exportAddress[s]es (by @osrecio)
 - #15574: [Forwardport] Fix typo in Image::open exception message (by @osrecio)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Event: dmcdindia Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

3 participants