Problem/Motivation


CUSTOM PROJECTS
--------------------------------------------------------------------------------
Examples for Developers
Scanned on Tue, 05/26/2020 - 19:04.

5 errors found. Avoid some manual work by using drupal-rector for fixing issues
automatically or Upgrade Rector to generate patches.

modules/contrib/examples/file_example/src/Form/FileExampleReadWriteForm.php:
┌──────────┬──────┬─────────────────────────────────────────────────────────────┐
│  STATUS  │ LINE │                           MESSAGE                           │
├──────────┼──────┼─────────────────────────────────────────────────────────────┤
│ Fix now  │ 392  │ Call to deprecated constant FILE_EXISTS_RENAME: Deprecated  │
│          │      │ in drupal:8.7.0 and is removed from drupal:9.0.0. Use       │
│          │      │ Drupal\Core\File\FileSystemInterface::EXISTS_RENAME.        │
│          │      │                                                             │
│ Fix with │ 452  │ Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated │
│ rector   │      │ in drupal:8.7.0 and is removed from drupal:9.0.0. Use       │
│          │      │ Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.       │
│          │      │                                                             │
└──────────┴──────┴─────────────────────────────────────────────────────────────┘

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#4 3143053-4.patch2.92 KBjungle
#4 interdiff-2-4.txt1.12 KBjungle
#2 3143053-6.patch2.92 KBjungle

Comments

jungle created an issue. See original summary.

jungle’s picture

Status: Active » Needs review
StatusFileSize
new2.92 KB
andypost’s picture

The only typo a/FileSystemInterface::FILE_EXISTS_RENAME/FileSystemInterface::EXISTS_RENAME

jungle’s picture

StatusFileSize
new1.12 KB
new2.92 KB

Nice catch. thanks @andypost!

andypost’s picture

Status: Needs review » Reviewed & tested by the community

No other mentions found, that's strange that no link to CR https://api.drupal.org/api/drupal/core%21includes%21file.inc/constant/FI...

  • jungle committed cdd01c4 on 3.x
    Issue #3143053 by jungle, andypost: Fix the call to deprecated constant...

  • jungle committed 7af1620 on 8.x-1.x
    Issue #3143053 by jungle, andypost: Fix the call to deprecated constant...
jungle’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @andypost!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.