Category : composer-php

For reasons that are unimportant (let’s just call it an intellectual curiosity) I’m trying to use Composer’s autoloader to load a package not in composer.json/composer.lock. Here’s what I’ve tried: $loader = new ComposerAutoloadClassLoader(); $loader->addPsr4(‘MyNameSpace’, __DIR__ . ‘/vendor/username/projectname/src’); $loader->register(); Unfortunately, this isn’t working. Whenever I try to do use MyNameSpaceWhatever; $a = new Whatever; I get ..

Read more

When deploying my Symfony app on Heroku, the official PHP buildpack runs my composer.json scripts and then seems to add a cache:clear command that I didn’t configure. Here is my composer.json "scripts" section : "scripts": { "auto-scripts": { "translation:download": "symfony-cmd", "ckeditor:install –clear=drop": "symfony-cmd", "ckfinder:download": "symfony-cmd", "assets:install –symlink –relative %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [], "post-update-cmd": [], ..

Read more

I have the following problem: I want to use PhpSpreadsheet to write in an Excel file. I installed the composer and did everything step by step. When I try to call up the -php page, it simply says "Not an entry point". Nothing happens in the Excel list either. Php-Code: <?php require_once ‘C:Users’myuser’vendorautoload.php’; use PhpOfficePhpSpreadsheetSpreadsheet; ..

Read more

I just went to install the phpunit/phpunit via composer and noticed there are two packages that seem to be named phpunit/phpunit: $ composer search "phpunit/phpunit" Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2 phpunit/phpunit The PHP Unit Testing framework. phpunit/phpunit The ..

Read more

i have generated a crud using the cmd php bin/console make:crud then i generated the entityrepository using php binconsole make:entity –regenerate but i replaced the created entityrepository to the Repository folder under /scr but while trying to run the crud i got this error: Cannot autowire argument $reviewClientRepository of "AppControllerReviewClientController::index()": it references class "AppEntityReviewClientRepository" but ..

Read more