[wp-trac] [WordPress Trac] #46327: Normalize class loading
WordPress Trac
noreply at wordpress.org
Sat Feb 23 12:24:49 UTC 2019
#46327: Normalize class loading
----------------------------+------------------------------
Reporter: szepe.viktor | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version:
Severity: trivial | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+------------------------------
Comment (by szepe.viktor):
If anyone interested:
Unpack the current release and
{{{
{
"require" : {
"giacocorsiglia/wordpress-stubs": "4.9.8"
},
"autoload": {
"psr-4": {
"": "wordpress/"
}
}
}
}}}
`composer update -o`
{{{
#!/bin/bash
sed -ne "s#.* . '/wordpress/\(.*\)',#\1#p"
../vendor/composer/autoload_classmap.php | uniq \
| xargs -I% grep -rExn
"\s*(require|include)(_once)?\(?\s*ABSPATH\s*\.\s*'/?%'\s*\)?;.*" | cut
-d: -f1-2 \
| while read -r FILE_LINE; do echo "$FILE_LINE ..."; sed -e
"${FILE_LINE#*:}"'s|.*|// AUTOLOAD &|' -i "${FILE_LINE%:*}"; done
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46327#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list