Updated: 03 September 2024
Laravel Forge is a server management and application deployment service.
Freelance software engineer United Kingdom
Updated: 03 September 2024
Laravel Forge is a server management and application deployment service.
Updated: 09 May 2024
CodeIgniter 4 Development
https://github.com/codeigniter4/CodeIgniter4
This repository is for the legacy version, CodeIgniter 3
https://github.com/bcit-ci/CodeIgniter
Updated: 06 May 2024
IP address of host from inside of Homestead: 10.0.2.2
Connect via ssh, from the Homestead directory
vagrant ssh
Run composer with php version 7.2
php7.2 /usr/local/bin/composer update
Reset to original state
vagrant destroy --force && vagrant up
Reload
vagrant reload --provision
Check which PHP versions have xdebug enabled
phpquery -v 5.6 -s fpm -m xdebug
phpquery -v 7.0 -s fpm -m xdebug
phpquery -v 7.1 -s fpm -m xdebug
phpquery -v 7.2 -s fpm -m xdebug
phpquery -v 7.3 -s fpm -m xdebug
phpquery -v 7.4 -s fpm -m xdebug
phpquery -v 8.0 -s fpm -m xdebug
phpquery -v 8.1 -s fpm -m xdebug
phpquery -v 8.2 -s fpm -m xdebug
phpquery -v 8.3 -s fpm -m xdebug
Enable the Xdebug module for the fpm SAPI of PHP version 5.6
phpenmod -v 5.6 -s fpm -m xdebug
Updated: 04 May 2024
Updated: 03 April 2024
PECL
https://pecl.php.net
The PHP Extension Community Library
PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.
PEAR
https://pear.php.net
PHP Extension & Application Repository
PEAR is a framework and distribution system for reusable PHP components.
Updated: 12 March 2024
Read contents of text file into a variable
$file_pointer = fopen('raw_bb_sample.txt', 'r') or die('Unable to open file!');
$sample = fread($file_pointer, filesize('raw_bb_sample.txt'));
fclose($file_pointer);
var_dump($sample);
Updated: 12 July 2024
Symfony releases, notifications and release checker
Dump the default configuration for security
bin/console config:dump-reference security
Updated: 04 April 2024
These tests ensure that individual units of source code (e.g. a single class or a method in a class) behave as intended. No different from writing standard PHPUnit unit tests.
These tests test a combination of classes and commonly interact with Symfony’s service container. These tests do not yet cover the fully working application.
Verify the behavior of a complete application. They make HTTP requests (both real and simulated ones) and test that the response is as expected.
The output of the make:test
command supplies a useful summary too
root@5b8333e33939:/var/www/html# bin/console make:test
Which test type would you like?:
[TestCase ] basic PHPUnit tests
[KernelTestCase ] basic tests that have access to Symfony services
[WebTestCase ] to run browser-like scenarios, but that do nott execute JavaScript code
[ApiTestCase ] to run API-oriented scenarios
[PantherTestCase] to run e2e scenarios, using a real-browser or HTTP client and a real web server
>
Updated: 09 May 2023
echo '<pre>';
$e = new \Exception;
var_dump($e->getTraceAsString());
echo '</pre>';
die;
https://stackoverflow.com/questions/1423157/print-php-call-stack
Updated: 27 July 2024
Install Composer phar
curl -sS https://getcomposer.org/installer | php
Circumvent php memory limit
php -d memory_limit=-1 composer.phar install
Up / downgrade Composer itself
composer self-update --help
composer self-update --1
composer self-update --2