This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
//Controller | |
public function indexAction(Request $request) { | |
$products = new DataObject\Product\Listing(); | |
$paginator = new \Zend\Paginator\Paginator($products); | |
$paginator->setCurrentPageNumber($request->get('page')); | |
$paginator->setItemCountPerPage(20); | |
return $this->renderTemplate('Controller/index.html.twig', [ | |
'paginator' => $paginator | |
git clone repo-url tmp && mv tmp/.git . && rm -rf tmp && git reset --hard | |
Explaination: | |
1) Do git clone in a tmp directory from current directory | |
2) move .git from tmp to the parent directory of tmp directory | |
3) reset git from the current directory |
syntax: | |
COMPOSER_MEMORY_LIMIT=-1 php-path composer-path update | |
example: | |
1) COMPOSER_MEMORY_LIMIT=-1 ea-php72 /opt/cpanel/composer/bin/composer update | |
2) COMPOSER_MEMORY_LIMIT=-1 /opt/cpanel/ea-php72/root/usr/bin/php /opt/cpanel/composer/bin/composer update |
Here is a sample command: | |
/usr/local/bin/ea-php72 /home/atunp/public_html/bin/console app:test |
bin/console pimcore:migrations:migrate -s pimcore_core -n | |
Run this command after composer update. |
services: | |
redis: | |
image: redis:alpine | |
command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] | |
db: | |
image: mariadb:10.7 | |
working_dir: /application | |
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb-file-per-table=1] | |
volumes: |
//inside webpack config file | |
var Encore = require('@symfony/webpack-encore'); | |
var dotenv = require('dotenv'); | |
Encore | |
// ... | |
// define the environment variables | |
.configureDefinePlugin(options => { | |
const env = dotenv.config(); |
apt-get update | |
apt-get install -y build-essential libtool autoconf uuid-dev pkg-config libsodium-dev libzmq3-dev | |
git clone https://github.com/zeromq/php-zmq.git | |
cd php-zmq | |
phpize && ./configure | |
make && make install | |
docker-php-ext-enable zmq | |
#now restart php-fpm container | |
#container info: | |
#No LSB modules are available. |
FROM pimcore/pimcore:PHP8.1-fpm | |
RUN apt-get update | |
RUN apt-get install -y build-essential libtool autoconf uuid-dev pkg-config libsodium-dev libzmq3-dev | |
RUN git clone https://github.com/zeromq/php-zmq.git | |
RUN cd php-zmq && phpize && ./configure | |
RUN cd php-zmq && make && make install | |
RUN docker-php-ext-enable zmq | |
RUN cd /var/www/html/ && rm -rf php-zmq/ |