相关疑难解决方法(0)

不建议使用:教义\ ORM \ Mapping \ UnderscoreNamingStrategy(不使其知道数字)已弃用

我正在使用Symfony 4.3.8,但找不到有关这些弃用的任何信息:

不推荐使用的用户:不建议使用创建Doctrine \ ORM \ Mapping \ UnderscoreNamingStrategy而不知道其编号的方法已被弃用,并将在Doctrine ORM 3.0中将其删除。

不赞成创建Doctrine \ ORM \ Mapping \ UnderscoreNamingStrategy而不通知其编号的做法已被弃用,并将在Doctrine ORM 3.0中将其删除。

我在stacktrace中搜索,发现了这一点:

class UnderscoreNamingStrategy implements NamingStrategy
{
private const DEFAULT_PATTERN      = '/(?<=[a-z])([A-Z])/';
private const NUMBER_AWARE_PATTERN = '/(?<=[a-z0-9])([A-Z])/';

/**
 * Underscore naming strategy construct.
 *
 * @param int $case CASE_LOWER | CASE_UPPER
 */
public function __construct($case = CASE_LOWER, bool $numberAware = false)
{
    if (! $numberAware) {
        @trigger_error(
            'Creating ' . self::class . ' without making it number aware is deprecated and …
Run Code Online (Sandbox Code Playgroud)

doctrine symfony doctrine-orm

15
推荐指数
1
解决办法
851
查看次数

Windows 上 Symfony 5.0.1 控制台中已弃用的类警告

执行php bin\console make:entity (User entity) 或php bin\console make:migration 后,我在控制台中收到这些警告:

2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\ObjectRepository class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\ObjectRepository instead.

2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\Mapping\AbstractClassMetadataFactory instead.

2019-12-13T15:49:53+00:00 [info] User Deprecated: The Doctrine\Common\PropertyChangedListener class is deprecated since doctrine/persistence 1.3 and will be removed in 2.0. Use \Doctrine\Persistence\PropertyChangedListener instead.

2019-12-13T15:49:53+00:00 [info] User Deprecated: The …
Run Code Online (Sandbox Code Playgroud)

php doctrine symfony doctrine-orm

3
推荐指数
1
解决办法
1872
查看次数

标签 统计

doctrine ×2

doctrine-orm ×2

symfony ×2

php ×1