Skip to content

Instantly share code, notes, and snippets.

View ElectricMaxxx's full-sized avatar
💭
Working in customer project on normal work days. OSS at night.

Maximilian Berghoff ElectricMaxxx

💭
Working in customer project on normal work days. OSS at night.
  • Mayflower GmbH
  • Ansbach, Germany
View GitHub Profile
## Search engine optimization for symfony developers
### International PHP Conference - Munic 2018
#### Maximilian Berghoff
---
# !Prophet && !Profit
Note: two almost eqaul words, but a lot cusultants use it the other way around

Requiring bundles with Symfony Flex

Symfony Flex as the new workflow to create Symfony application is awesome. It is quite easy to add or remove bundles by

composer req cli
# or
composer req symfony/console

Reciepes are responsible to create a pre configuration for bundles to register, configuration to set, env variables ... You can create your own reciepes by commiting to one of the repositories

Verifying that +electricmaxxx is my blockchain ID. https://onename.com/electricmaxxx
Eigentlich möchte ich gerne einen Provider als eine art Chain implementieren, der im `.config()` block über einen Adder
Services eingehängt bekommt. Wenn ich aber folgendes probiere:
``` javascript
angular.module('myModul', []).config(function(myCoolProvider, myService) {
myCoolProvider.add(myService);
});
``
Der Provider chaint durch die einzelnen Services und tut damit was. Das ist für mich eine Art meine lib offen für
cusotmizing zu halte, dann ein Nutzer, dann selbständig Services einhängen kann.

When runing my first .phar application (created by box build), i got the following PHP Waringing, which i don't understand:

PHP Warning:  copy(phar:///home/maximilian/Projekte/CompanyBacklog/jira-vcf-importer/dist/jira-vcf-importer.phar/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd): failed to open stream: phar error: "vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" is not a file in phar "/home/maximilian/Projekte/CompanyBacklog/jira-vcf-importer/dist/jira-vcf-importer.phar" in phar:///home/maximilian/Projekte/CompanyBacklog/jira-vcf-importer/dist/jira-vcf-importer.phar/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php on line 437
PHP Stack trace:
PHP   1. {main}() /home/maximilian/Projekte/CompanyBacklog/jira-vcf-importer/dist/jira-vcf-importer.phar:0
PHP   2. require() /home/maximilian/Projekte/CompanyBacklog/j
@ElectricMaxxx
ElectricMaxxx / gist:9d7abe2bc3d82dd7ed9d
Created February 17, 2015 13:19
Product after export

Product:

O:25:"Bepado\SDK\Struct\Product":26:{s:8:"sourceId";s:32:"6b63456b3abeeeccd9b085a76ffba1a3";s:7:"groupId";N;s:3:"ean";s:0:"";s:3:"url";s:103:"http://bepado-oxid-remote.mayflowerkunden.de/Bekleidung/Fashion/Fuer-Sie/Jeans/Kuyichi-Jeans-CANDY.html";s:5:"title";s:19:"Kuyichi Jeans CANDY";s:16:"shortDescription";s:30:"Eng geschnittene Stretch-Jeans";s:15:"longDescription";s:240:"<div style="font: 12px 'Lucida Grande',Lucida,Verdana,sans-serif">Stretch-Jeans von Kuyichi, eng geschnitten und in dunkler Waschung.<br />
<br /><strong>100% ökologisch angebaute Baumwolle, 100% Fair Trade.</strong><br />
<br />
</div>";s:6:"vendor";s:20:"www.true-fashion.com";s:8:"language";s:2:"de";s:3:"vat";d:0.19;s:5:"price";d:75.546218487394952;s:13:"purchasePrice";d:75.546218487394952;s:10:"fixedPrice";b:0;s:8:"currency";s:3:"EUR";s:8:"shipping";N;s:12:"deliveryDate";N;s:12:"availability";s:2:"26";s:6:"images";a:4:{i:0;s:104:"http://bepado-oxid-remote.mayflowerkunden.de/out/pictures/generated/product/1/380_340_75/fron

Shopping.php Line 236:

a:28:{i:0;O:41:"Bepado\SDK\Struct\Change\InterShop\Update":5:{s:7:"product";O:25:"Bepado\SDK\Struct\Product":26:{s:8:"sourceId";i:15;s:7:"groupId";N;s:3:"ean";N;s:3:"url";s:86:"http://qa.de.cloud2-vm153.de-nserver.de/432_bp_es/bepado_product_gateway/product/id/15";s:5:"title";s:22:"LUNG CHING grüner Tee";s:16:"shortDescription";s:340:"A barathrum lA barathrum lex dictata sesquimellesimus per, nox hic adfero Quin capreolus immo Quod consulo post vermis aura to Pala iam Violenter aro substrictus ius Objurgo vitupero.ex dictata sesquimellesimus per, nox hic adfero Quin capreolus immo Quod consulo post vermis aura to Pala iam Violenter aro substrictus ius Objurgo vitupero.";s:15:"longDescription";s:1007:"<p>St confidenter, boo gero perversa. Tandem quod levo rectum prae adolescens ingens no sino sed hi furs, for expello eia prae, dies inhibeo prodigialiter supergredior eia. Cervus, sis gens mire ter curvo vena ultra illectus redigo incubo. Prodigus bravium oro Aula, sui vulpes ymo eruo 

Rersvation back from SDK->reserveProducts()


O:29:"Bepado\SDK\Struct\Reservation":3:{s:7:"success";b:0;s:8:"messages";a:1:{i:62;a:0:{}}s:6:"orders";a:1:{i:62;O:23:"Bepado\SDK\Struct\Order":10:{s:9:"orderShop";s:2:"47";s:12:"providerShop";s:2:"62";s:13:"reservationId";N;s:12:"localOrderId";N;s:15:"providerOrderId";N;s:8:"shipping";O:26:"Bepado\SDK\Struct\Shipping":7:{s:6:"shopId";i:62;s:4:"rule";N;s:11:"isShippable";b:1;s:13:"shippingCosts";d:10;s:18:"grossShippingCosts";d:11.899999999999999;s:16:"deliveryWorkDays";i:10;s:7:"service";s:11:"check-value";}s:11:"paymentType";s:7:"unknown";s:10:"orderItems";a:28:{i:0;O:27:"Bepado\SDK\Struct\OrderItem":3:{s:5:"count";i:1;s:7:"product";O:25:"Bepado\SDK\Struct\Product":26:{s:8:"sourceId";s:2:"15";s:7:"groupId";N;s:3:"ean";s:0:"";s:3:"url";s:71:"http://bepado-oxid-local.mayflowerkunden.de/LUNG-CHING-gruener-Tee.html";s:5:"title";s:22:"LUNG CHING grüner Tee";s:16:"shortDescription";s:255:"A barathrum lA barathrum lex dictata sesquimellesimus per, nox hic adfero 
@ElectricMaxxx
ElectricMaxxx / gist:5bac51d95af4ffe91957
Last active August 29, 2015 14:11
composer.lock for sandbox pull request

atm i got the follwing error:

 [Composer\DependencyResolver\SolverProblemsException]                                                           
    Problem 1                                                                                                     
      - Installation request for symfony-cmf/symfony-cmf dev-menu_2.0 -> satisfiable by symfony-cmf/symfony-cmf[  
  dev-menu_2.0].                                                                                                  
      - symfony-cmf/symfony-cmf dev-menu_2.0 requires doctrine/phpcr-odm 1.2.* -> no matching package found.      
    Problem 2                                                                                                     
      - Installation request for jackalope/jackalope-doctrine-dbal 1.1.* -> satisfiable by jackalope/jackalope-d  
@ElectricMaxxx
ElectricMaxxx / gist:ae42665dbae7b65d4137
Last active August 29, 2015 14:11
Vorbereitungen für den Workshop - conference-tutorial

Für den Workshop sollten auf euren Maschinen folgendes bereit stehen:

  • git
  • php >= 5.3
  • composer oder cURL um .phar laden zu können
  • mysql oder sql_lite

Ob das auf dem lokalen Rechner läuft oder ihr eine VM dafür verwendet sei ganz euch überlassen.

Danach kann man sich das Tutorial schon einmal per git clone ... auf seinen Rechner holen: