Giter Site home page Giter Site logo

Comments (6)

iglooom avatar iglooom commented on May 27, 2024

Хм, а у меня вроде при явном указании ошибка пропадает. А вот в случае inheritDoc и просто для указания в phpdoc тоже вылез алерт.

from yii2support.

WinterSilence avatar WinterSilence commented on May 27, 2024

@iglooom на самом деле, свойство уже явно указано в yii\gii\generators\crud\Generator и значение дожно определяться без проблем

кстати регулярка неверная, имя класса может содержать числа

Pattern pattern = Pattern.compile("\\\\[A-Za-z\\\\]+");

from yii2support.

iglooom avatar iglooom commented on May 27, 2024

Конкретно этот момент проверяется вот тут

if (field instanceof PhpDocProperty && isReadonlyProperty(phpClass, (PhpDocProperty) field)) {

И этот параметр в yii\gii\generators\crud\Generator типа ридонли и по этому не попадает в подсказку.

from yii2support.

WinterSilence avatar WinterSilence commented on May 27, 2024

@iglooom @property-read вот свойство только для чтения, public свойства доступны для записи, смысл добавлять сеттер для него?

from yii2support.

iglooom avatar iglooom commented on May 27, 2024

Тоже без понятия почему именно так было реализовано. Смотрю просто что https://github.com/yiisoft/yii2-gii/blob/ef0ea5fa8db7a77c7e801f637fb67cdfba479c45/src/generators/crud/Generator.php#L28 тут указано "This property is read-only." при этом в @Property не указано что -read и видимо когда плагин писали как раз проверяли такие кейсы наличием сеттера.

from yii2support.

WinterSilence avatar WinterSilence commented on May 27, 2024

@iglooom понял в чем дело, свойство viewPath задано явно, но в комменте класса указано как динамическое

 * @property string $viewPath The controller view path. This property is read-only.
 */
class Generator extends \yii\gii\Generator
{
    public $viewPath;

from yii2support.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.