Skip to content

Instantly share code, notes, and snippets.

View mickaelandrieu's full-sized avatar
💻
Hard Working on IA Projects

Mickaël Andrieu mickaelandrieu

💻
Hard Working on IA Projects
View GitHub Profile
➜ PrestaShop git:(1.7.6.x) php bin/console about
-------------------- -------------------------------------------
Symfony
-------------------- -------------------------------------------
Version 3.4.26
End of maintenance 11/2020
End of life 11/2021
-------------------- -------------------------------------------
Kernel
-------------------- -------------------------------------------
version: "3"
services:
nginx:
image: nginx:1-alpine
env_file: .env
depends_on:
- php
- blackfire
ports:
BLACKFIRE_SERVER_ID=your-server-id-key
BLACKFIRE_SERVER_TOKEN=your-server-token
FROM php:7.2-alpine
LABEL MAINTAINER="Mickaël Andrieu <[email protected]>"
RUN apk add --update libxslt-dev && \
docker-php-ext-install xsl
RUN curl -fsSL https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
RUN composer global require 'edgedesign/phpqa' 'friendsofphp/php-cs-fixer' 'jakub-onderka/php-parallel-lint' 'phpstan/phpstan' 'vimeo/psalm' --no-progress --no-scripts --no-interaction
@mickaelandrieu
mickaelandrieu / index.php
Created August 9, 2018 19:21
Contrôleur frontal standard Symfony 4
<?php
use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\HttpFoundation\Request;
require __DIR__.'/../vendor/autoload.php';
// The check is to ensure we don't use .env in production
metrics:
services:
label: "Appels du Container de Services"
matching_calls:
php:
- callee:
selector: "=Symfony\Component\DependencyInjection\Container::get"
argument: { 1: "^"}
tests:
<?php
/**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
File/folder name Description Details
name_of_the_mod Main file. The main PHP
ule.php file should
have the same
name as the
module's root
folder. For
instance, for
the BlockCMS
PHP Fatal error: Uncaught Error: Call to undefined method Symfony\Bundle\FrameworkBundle\Console\Application::setCommandLoader() in /home/dev/Projects/PrestaShop/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:162
Stack trace:
#0 /home/dev/Projects/PrestaShop/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(132): Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands()
#1 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(94): Symfony\Bundle\FrameworkBundle\Console\Application->add(Object(Symfony\Component\Console\Command\HelpCommand))
#2 /home/dev/Projects/PrestaShop/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(40): Symfony\Component\Console\Application->__construct('Symfony', '3.4.1')
#3 /home/dev/Projects/PrestaShop/src/PrestaShopBundle/Service/Command/AbstractCommand.php(60): Symfony\Bundle\FrameworkBundle\Console\Application->__construct(Object(AppKernel))
#4 /home/dev
@mickaelandrieu
mickaelandrieu / arrayIterator.js
Last active September 17, 2017 20:50
ES6 array iterator using generator
/**
* let it = arrayIterator(['foo', 'bar', 'baz']);
* it.next().value; // "foo"
* it.next().value; // "bar"
* it.next().value; // "baz"
* it.next().value; // undefined
*/
function* arrayIterator() {
let array = arguments;
let index = 0;