run build/stubGenerator.php
inspect stubs.php
All the classes in that file should exist, else you are telling developers and IDE's to allow auto-completion to non-existing classes
For example the following are all invalid, as the class that is on the right of extends
no longer exists in Joomla:
(There are a lot! This is just an example from near the bottom of the file)
/**
* @deprecated 5.0 Use Joomla\CMS\Filesystem\Wrapper\FileWrapper instead.
*/
class JFilesystemWrapperFile extends Joomla\CMS\Filesystem\Wrapper\FileWrapper {}
/**
* @deprecated 5.0 Use Joomla\CMS\Filesystem\Wrapper\FolderWrapper instead.
*/
class JFilesystemWrapperFolder extends Joomla\CMS\Filesystem\Wrapper\FolderWrapper {}
/**
* @deprecated 5.0 Use Joomla\CMS\Filesystem\Wrapper\PathWrapper instead.
*/
class JFilesystemWrapperPath extends Joomla\CMS\Filesystem\Wrapper\PathWrapper {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Backgroundfill instead.
*/
class JImageFilterBackgroundfill extends Joomla\Image\Filter\Backgroundfill {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Brightness instead.
*/
class JImageFilterBrightness extends Joomla\Image\Filter\Brightness {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Contrast instead.
*/
class JImageFilterContrast extends Joomla\Image\Filter\Contrast {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Edgedetect instead.
*/
class JImageFilterEdgedetect extends Joomla\Image\Filter\Edgedetect {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Emboss instead.
*/
class JImageFilterEmboss extends Joomla\Image\Filter\Emboss {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Negate instead.
*/
class JImageFilterNegate extends Joomla\Image\Filter\Negate {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Sketchy instead.
*/
class JImageFilterSketchy extends Joomla\Image\Filter\Sketchy {}
/**
* @deprecated 5.0 Use Joomla\Image\Filter\Smooth instead.
*/
class JImageFilterSmooth extends Joomla\Image\Filter\Smooth {}
Labels |
Added:
No Code Attached Yet
|
I think your version of the stubs file must be old or something? For example JFilesystemWrapperFile
isn't in the classmap file or my generated stubs file? The image ones in the latest classmap file also correctly map to the CMS now https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/classmap.php#L457-L465
I guess we will never know.
I have just manually run stubGenerator.php (Im in a different location, different mac today) and the stubs.php file generated has PHP errors in it now.
PHP Parse error: syntax error, unexpected fully qualified name "\Joomla\CMS\Crypt\CipherInterface", expecting identifier in /Users/phil/Sites/JOOMLA/joomla4/stubs.php on line 1960
Parse error: syntax error, unexpected fully qualified name "\Joomla\CMS\Crypt\CipherInterface", expecting identifier in /Users/phil/Sites/JOOMLA/joomla4/stubs.php on line 1960
I mean remember stubs is just a file for developers to get typehints with because IntelliJ/vscode don’t understand the class map. So the final class extensions is totally fine.
The other part is I don’t think it likes the class name being a namespace for the extends. Not really sure what the workaround is in a php file I guess a namespace section within the file. But that’s just a bug in the way the stub map is generated as a cheap workaround. The class map itself is sound. Definitely a nice to fix though
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-15 19:02:04 |
Closed_By | ⇒ | PhilETaylor |
@wilsonge A mutual anonymous friend states: "This is a release blocker. The stub generator uses the classmap aliases to generate the stub file, which means the B/C layer for renamed/removed classes is incorrect and B/C is broken by aliasing to non-existent classes."