Coder Social home page Coder Social logo

configuration's People

Contributors

busterneece avatar enricog84 avatar sagikazarmark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

configuration's Issues

IniFileLoader failes to parse ini

The ini file loader IniFileLoader, failes to parse the following file.

[program:FOOBAR2]
command = /vagrant/app/console rabbitmq:dynamic-consumer something customer#FOOBAR2 --env=prod
numprocs = 1
autostart = 0
autorestart = 0

Used code:

$filesystem = new Filesystem(new Adapter\Local(dirname($this->confFile)));

$loader = new IniFileLoader($filesystem, basename($this->confFile));

$configuration = $loader->load(); // throws: The option "autostart" with value 0 is expected to be of type "bool", but is of type "integer".

$this->confFile is the path to the file.

Am I wrong or the ini file parser cannot handle the program sections?

Byte options in INI files cannot be parsed with updated options-resolver

I updated my composer dependencies, and am since getting this error:

The option "logfile_maxbytes" with value "50MB" is expected to be of type "byte", but is of type "string",
in /vendor/symfony/options-resolver/OptionsResolver.php:1030. My symfony/options-resolver version is v5.2.1.

Removing logfile_maxbytes from my supervisord.conf obviously solves this problem for now.

It seems that since symfony/options-resolver@cba9d94, the logfile_maxbytes option can no longer be parsed because is_<type>, or in this case is_byte, is not called anymore.

Cannot write empty configuration

When I attempt to write an empty config to a file (say, I removed the last remaining section) using Supervisor\Configuration\Writer\File it will throw a [Supervisor\Exception\WrittingFailed] Cannot write configuration into file /path/to/file.conf exception.

Storing an empty string to a file $this->writeFile($fileContents)) will return 0, this in turen gets evaluates as false, and an exception will be thrown:

if (!$result = $this->writeFile($fileContents)) {
            throw new WrittingFailed(sprintf('Cannot write configuration into file %s', $this->file));
        }

Even though the write operation was successful.
Non boolean value go evaluated to false, a check for boolean false fixes this issue:

if (false === $result = $this->writeFile($fileContents)) {
            throw new WrittingFailed(sprintf('Cannot write configuration into file %s', $this->file));
        }

More details: http://php.net/manual/en/function.file-put-contents.php

[Improvement] supervisorphp/configuration blocks upgrade to Symfony LTS 2.7.*

https://packagist.org/packages/supervisorphp/configuration
v0.1.02015-01-13 23:00 UTC
Requires
php: >=5.4.0
symfony/options-resolver: ~2.6.0

We are currently locked to Symfony 2.6.* because of the requirement.

Need to be able to upgrade to Symfony 2.7.* as this is the LTS version. 2.6.* will reach end of maintentance in 07/2015 and end of life in 01/2016.

See http://symfony.com/doc/current/contributing/community/releases.html

configuration file permission

Could you give me some suggestion about how to handle configuration file permissions?

actually my specific conf file on the server is owned by root:root and has 644 permission

so obviously my php script cannot write it because it's launched from a normal shell user.

What could we do?

Octal values

When converting a a string to integer, the octal value is converted to decimal

Affected sections: Supervisord, Program, FcgiProgram

Update dependencies

Hi,
please can you update dependencies of this package?

It is hard to use these days and I don't see any replacement for this package.

Thank you.

Create a generic INI package

Under the SupervisorPHP namespace, most of the configuration package could be split to a generic INI package.

Readme outdated

The readme says that the File parser is still available, but the source says it has been removed in v0.2.0.
What is the 'official' status?
Maybe there is a small example as well that can be used to update the readme.

Cheers (Üdv),
Tibor

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.