Skip to content
Advertisement

Tag: composer-php

How to autoload custom annotation classes without using AnnotationRegistry?

I’m using Doctrine Annotations library (not the whole Doctrine, only annotations) and want to make a custom annotation class. composer.json: index.php: entities/MyClass.php annotations/TestAnnotation.php It gives me the following error: The only solution i found on the Internet is to use AnnotationRegistry::registerLoader or something similar, but it is deprecated so i’d like to solve the problem in another way. Answer One

OSX composer increase memory limit

I am having memory issues with composer; trying to increase the available amount above 128MO. I have been following the guidelines from composer.org but nothing seems to work. If I locate php.ini on my machine I get: I sudo /private/etc/php.ini.default and change MEMORY_LIMIT = 512MO but when I do php -r “echo ini_get(‘memory_limit’).PHP_EOL;” I still get 128 MO now I

PHP Composer Can’t find autoloaded file

I am trying to autoload a file and my PSR-4 autoloading worked fine locally however now that I am deploying to a baremetal server. It is not working and PHP states that it can’t find the autoloaded file. This is the current error: Fatal error: Class ‘MetabaseModelsCron’ not found in /usr/www/users/metabase/src/commands/ArticleFetchCron.php on line 25 My composer.json is as follows: The

Keep XAMPP & Install WAMP

I am using Windows 7 and I have XAMPP installed. In Git Bash when I type php -v I get PHP 5.6.15. I need newer version of PHP because I am using Composer and I am unable to install packages that require PHP 7.1. I know that one way to solve this is to backup projects, uninstall the current XAMPP

Composer Install – requires ext-mbstring

I am trying to do a composer install …, but getting an error of requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. I am using Apache (Cpanel) and PHP 5.6. Below are the ways I am trying to fix the error. 1: yum search mbstring 2: yum install ea-php56-php-mbstring.x86_64 It seems mbstring is installed

Installing laravel suddenly some json file cannot be downloaded

I typed create-project laravel/laravel “foldername” and got this message: [ComposerDownloaderTransportException] The “http://packagist.org/p/illuminate/console%241d2f57f687204b9a57e5848fe9f49e79bc2fb7ed0cafc6d1387ad4760a1b155c.json” file could not be downloaded (HTTP/1.1 404 Not Found) What’s this for? I already got the laravel structure files but i don’t want to continue without knowing whats with this error. Update: composer.json content under my laravel folder structure } Answer add this on your composer: and run

Advertisement