Flint is a microframework build on top of Silex. It brings the full Router, conventions and structure to Silex.
You can read more about in it documentation.
Easy loading of configurations files using Symfony Config. Supports Normalization, Inheritance and a buttload of filetypes.
Home Page: http://flint.rtfd.org/projects/tacker
License: MIT License
Flint is a microframework build on top of Silex. It brings the full Router, conventions and structure to Silex.
You can read more about in it documentation.
Catchable fatal error: Object of class Symfony\Component\Config\ConfigCache could not be converted to string in vendor/flint/tacker/src/Tacker/Loader/CacheLoader.php on line 58
require:
"symfony/config" : ">=2.3"
should be:
"symfony/config" : "^2.3"
currently, the normalizers are used as string replacement before the parsing. But this means that they would need to produce a different output depending on the format of the loaded file, because of the escaping needed for the format.
Here is an example:
$pimple = new Pimple();
$pimple['message'] = '"This is a message starting with a quote';
$yaml = <<<YAML
my_param: %message%
YAML;
$processed = (new Tacker\Normalizer\PimpleNormalizer($pimple))->normalize($yaml);
$result = <<<YAML
my_param: "This is a message starting with a quote
YAML;
$neededResult = <<<YAML
my_param: '"This is a message starting with a quote'
YAML;
We have $processed === $result
, but $result
is invalid Yaml, because a string value starting with a double quote needs to be quoted (here, the quote is matched as the beginning of a double quoted value, with a missing closing quote thorwing a parse error).
Other easy broken cases are true
vs 'true'
or a string containing a #
(comment marker in Yaml if you don't quote the value), and they are not the only ones.
This issue is of course not specific to YAML. Other formats can also get broken.
a side effect is that the config will get inconsistent:
my_param: %debug%
{ "my_param": "%debug" }
$yamlConfig === array('my_param' => true);
$jsonConfig === array('my_param' => 'true');
I expect options to be merged instead of being overwritten:
config.yml
php:
timezone: "UTC"
error_reporting: 0
ini:
display_errors: false
display_startup_errors: false
config_development.yml
php:
error_reporting: -1
ini:
display_errors: true
display_startup_errors: true
Expected result:
$app['php']['timezone'] contains "UTC"
Actual results:
$app['php']['timezone'] does not exist
The ability to pass file names to the \Symfony\Component\Yaml\Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.
require-dev:
"symfony/yaml" : "~2.2"
should be:
"symfony/yaml" : "^2.2"
If my configuration looks like:
kernel.env: "#KERNEL_ENV#"
monolog.logfile: "%root_dir%/logs/%kernel.env%.log"
I would like/expect kernel.env
to be available (e.g. can be referenced) by all subsequent option definitions. The only constraint being of course that options can only refer to previously defined options (so order of definitions is relevant).
Not sure if this properly describes what I mean, fingers crossed.
Hi Henrik.
This issue is on version 1.2.1of flint/tacker.
I haven't upgraded due to the dependencies for Pimple 1.0 and Silex 1.3
I have a security configuration like this:
security.firewalls:
secret:
pattern: "^/something"
my_login:
logout_return_path: '/logout/success'
login_return_path: '/somepath
users: %security.user_provider.my_login%
logout:
logout_path: '/somepath/logout'
users: %security.user_provider.my_login%
is picked up fine by the PimpleNormalizer but just after the EnvironmentNormalizer triggers and at this point tries to convert my object into a string which fails of course. Do you know why it would try and parse the object in the EnvironmentNormalizer since it was picked up by the PimpleNormalizer?
If I simply check for objects in the EnvironmentNormalizer and return if so then the code seems to run as expected.
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.