gnugat / gnugat.github.io Goto Github PK
View Code? Open in Web Editor NEWBlog about technical and practices advices
Home Page: https://gnugat.github.io/
Blog about technical and practices advices
Home Page: https://gnugat.github.io/
I'm using HTTPS Everywhere and thus being redirected to https://gnugat.github.io/ automatically. Sadly, since some days, your blog is broken when using HTTPS because the assets gets loaded via an absolute http://
URL:
I'm new to sculpin and wasn't able to determine where site.url
is defined, otherwise this would've been a pull request ;)
The section describing ReactPHP is too confusing. Expand it to better explain the differences between PHPFastCGI, Aerys, IcicleIo and ReactPHP.
See:
There is something missing, may be you were interrupted in the middle of your writing :)
Please take a look at this line on your nice blog post.
Hi. Reading articles about Mars rover. Have one question. You are using php7 and write is_int to check the input arguments. Why? You can use strict types to leave php to do that.
See constructor inside this file
https://github.com/gnugat/gnugat.github.io/blob/master/_sculpin/source/_posts/2016-06-29-mars-rover-landing.md
Thanks ;)
Hi Loïc,
Thank you for your great article about how to use the Sf2 Console component as a standalone library.
I'm currently working on a similar project and I wanted to go a bit further by validating the user configuration using the Sf2 Config component. Everything works fine except I have a small problem. I don't know how to interpret the "imports" directives inside my Yaml config file. I use an extension to validate and inject my configuration inside the container. Here is how my console file looks like:
#!/usr/bin/env php
<?php
set_time_limit(0);
function includeIfExists($file)
{
if (file_exists($file)) {
return require_once $file;
}
}
$autoload = includeIfExists(__DIR__ . '/vendor/autoload.php');
if (!$autoload) {
fwrite(STDERR, 'You must set up the project dependencies.' . PHP_EOL);
exit(1);
}
$container = new \Symfony\Component\DependencyInjection\ContainerBuilder();
$configs = \Symfony\Component\Yaml\Yaml::parse(__DIR__ . '/config/config.yml');
$extension = new \Acme\DependencyInjection\AcmeExtension();
$extension->load($configs, $container);
$container->get('console.application')->run();
As you see, I'm passing my config (read from a yml file) inside the load method of my extension. Then in my extension, I'm processing the configuration and loading the services.
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('ws.console.application.name', $config['name']);
$container->setParameter('ws.console.logs.path', $config['logs']['path']);
// etc.
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services/console.xml');
$loader->load('services/logger.xml');
$container->compile();
}
This works fine, but in my config.yml
file I want to use the imports
and parameters
directives, like in Symfony2. Would you know how could I do this?
As far as I know, this is done in the YamlFileLoader, but then, does it mean I have to load
my config.yml file like I do for the services? If I do this, how do I pass the config array inside the extension? Is it something complicated to do without the fullstask Symfony? I saw Behat 2.5 had its own configuration Loader.
Thanks for your help.
the article
is unbelievable, at last an article which clarify those concept. Thanks for all.
just I wondered the command bus
$createdProfile = $this->get('command_bus')->handle(new CreateNewProfile(
$request->request->get('name')
));
what does it look like ? and how do it take care of the middleware ?
Thanks for all again, this article is unbelivable and so clear.
IN Symfony Webservices 3.1, replace
A request usually have headers
with
A request usually has headers
Hi Loïc.
I read your blog using a feed reader and it's always difficult to follow the link for each entry, as it doesn't contains the full URL.
I don't know if is a problem with my feed reader (Claws) that doesn't read the base URL for all entries or just that Sculpin is not generating full URLs because missing configuration or other problem.
I will investigate within atom specification and my feed reader implementation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.