Giter Site home page Giter Site logo

gnugat.github.io's Issues

Blog broken on HTTPS

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:

broken-https

I'm new to sculpin and wasn't able to determine where site.url is defined, otherwise this would've been a pull request ;)

Continue the idea

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.

Console component configuration

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.

Grammar

IN Symfony Webservices 3.1, replace
A request usually have headers
with
A request usually has headers

Atom entry link

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.