我正在使用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) 执行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)