11.2 packages preinstall needs change

Hi, I was trying to install a package in a 11.2 instance and I got this error:
PHP Fatal error: require_once(): Failed opening required 'vendor/symfony/filesystem/Filesystem.php' (include_path='/Applications/MAMP/htdocs/WORK/GIT/gitq190308-aelca-implantacion/sugarcrm:/Applications/MAMP/htdocs/WORK/GIT/gitq190308-aelca-implantacion/sugarcrm/vendor:.:/Applications/MAMP/bin/php/php7.3.9/lib/php') in /Applications/MAMP/htdocs/WORK/GIT/gitq190308-aelca-implantacion/sugarcrm/cache/mlp_temp/WQFguT/scripts/pre_install.php on line 6
I have found out that, yes, vendor/symfony/filesystem folder is not there anymore, so pre_install.php should be changed.
Does anybody knows what changes have to be made to preinstall, or have a working version of pre_install.php for 11.2?
Thanks
  • Hi Javier,

    Is this a package of yours? did it work in previous versions? are you installing it in a cloud environment?

    This will help us better understand and provide a solution for ya.

    thanks,

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

  • Yes, this is a package made from another working packages. I have tried in an 11.1 instance and works as usual.

    The original packages were generated using a Packager app developed in our company.

    It uses vendor/symfony/filesystem/Filesystem.php for operations like dumpFile, appendToFile or remove.

    Do you know what are we supposed to use instead missing vendor/symfony/filesystem/Filesystem.php?

  • And I tried using

    use Symfony\Component\Filesystem\Filesystem;
    (as seen on sugarcrm/vendor/symfony/http-kernel/Tests/KernelTest.php)
    But it keeps failing
  • Hi Javier,

    I have confirmed that this dependency has been removed from our codebase since it wasn't being used.

    You can add that library to your package or use another library, this is no longer available from version 11.2 onwards, here is how you can do thatsupport.sugarcrm.com/.../index.html

    You should also consider reviewing your package on filesystem management, we usually ask our partners to follow ourCloud Policy to avoid issues on that particular topic.

    Hope this helps,

    rafa

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

  • Thanks Rafael, you are right. We will update our packages accordingly