Override concrete/Src/* in package

Permalink
Hello, I am trying to extend a particular file in the concrete/Src/ folder in my package. I would like to add extended functionality. So far I have read various guides but only able to extend from the application directory (namely thishttps://www.concrete5.org/documentation/how-tos/developers/override-... but it doesn't work in package, and I obviously cant make people transfer/copy this stuff in their own bootstrap.php/app.php.

So far I have tried name convention the same, but that's about the only lead I have.

File I want to override:
concrete/src/File/Image/BasicThumbnailer.php


File I put in package: (all ive tried)
packages/my_package/src/Concrete/Core/File/Image/BasicThumbnailer.php
packages/my_package/src/Core/File/Image/BasicThumbnailer.php
packages/my_package/src/File/Image/BasicThumbnailer.php


and of course their associated namespaces:
namespace Concrete\Package\MyPackage\Src\Concrete\Core\File\Image;
namespace Concrete\Package\MyPackage\Src\Core\File\Image;
namespace Concrete\Package\MyPackage\Src\File\Image;


Things to remember:
I have override cache off (all caches actually)
Every time i try, i have uninstall/reinstalled the package

Any help will be appreciated. This is also going to the marketplace so I hope I can get this up! Basically I am trying to override the thumbnail services (both legacy and new) for added function.

emirii
 
emirii replied on at Permalink Best Answer Reply
emirii
Its funny how sometimes you find the answer just right after you post...

Core::alias('Concrete\Package\MyPackage\Src\Core\File\Image\BasicThumbnailer', '\Concrete\Core\File\Image\BasicThumbnailer');


work for me, but will something like this be a problem when coming to market place?
dzimney replied on at Permalink Reply
dzimney
Is the best place for this in the on_start function of the package controller?
JohntheFish replied on at Permalink Reply
JohntheFish
Any package overriding a core file will automatically be 'black' in the marketplace. If its an override pending an update to the core and provides a mechanism to disable, then it may be graded 'red'.
surefyre replied on at Permalink Reply
surefyre
So how best then to override e.g. the IP Blacklist message without aliasing concrete/src/Permission/IPService to put in different text?

Or any other system message, for that matter?