Окружение - Убунту, докер, PHP8, firefox.
Данные - отчёт из вкладки Network. OpCache+Preload включен, jit не используется.
Фреймворк - Symfony 5.3
Простой контроллер с рендером твига.
RoadRunner | nginx+php-fpm |
---|
<?php $i=1; |
Окружение - Убунту, докер, PHP8, firefox.
Данные - отчёт из вкладки Network. OpCache+Preload включен, jit не используется.
Фреймворк - Symfony 5.3
Простой контроллер с рендером твига.
RoadRunner | nginx+php-fpm |
---|
<?php | |
declare(strict_types=1); | |
namespace App\Container; | |
#[\Attribute(\Attribute::TARGET_PROPERTY)] | |
class AutoInject | |
{ |
sudo socat tcp-listen:8000,reuseaddr,fork tcp:localhost:80 |
'use strict'; | |
const gulp = require("gulp"); | |
const sass = require('gulp-sass'); | |
// const autoprefixer = require('autoprefixer'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const livereload = require('gulp-livereload'); | |
const export_sass = require('node-sass-export'); | |
const sassGlob = require('gulp-sass-glob'); | |
const postcss = require('gulp-postcss'); |
window.Drupal = window.Drupal || {}; | |
((document) => { | |
let tag = document.querySelector('script[src*="youtube.com/iframe_api"]'); | |
const html = document.querySelector('html'); | |
let timer; | |
let YT = null; | |
Drupal.YT = function (callback) { | |
if (YT) { | |
callback(YT); |
((document, window) => { | |
window.App = window.App || {}; | |
let tag = null; | |
let YT = null; | |
const html = document.querySelector('html'); | |
App.YT = function (callback) { | |
if (!tag) { | |
tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
document.querySelector('head').append(tag); |
alias drush="docker-compose exec php vendor/bin/drush" | |
alias drupal="docker-compose exec php vendor/bin/drupal" | |
alias composer="docker-compose exec php composer" |
class BindedTemplate extends HTMLTemplateElement { | |
processTokens() { | |
return this._tokens.map((token) => { | |
token = token.substr(2, token.length - 3); | |
let not = token[0] === '!'; | |
let notnot = not && token[1] === '!'; | |
if (not) { | |
token = token.substr(not + notnot); | |
} | |
let value = token.split('.').reduce((value, subtoken) => { |
drush ev "return ['namespaces' => array_map(function (\$s) {return ['namespace' => \$s,'path' => Drupal::service('twig.loader.filesystem')->getPaths(\$s)[0]];}, Drupal::service('twig.loader.filesystem')->getNamespaces())]" --format=json > web/ide-twig.json |