psfs / core Goto Github PK
View Code? Open in Web Editor NEWPHP Simple Fast & Secure
License: MIT License
PHP Simple Fast & Secure
License: MIT License
Actually API returns JSON objects using UpperCamelCase:
{
"IdAddress": 0,
"Address": "string",
"City": "string",
"Province": "string",
"State": "string",
"PostalCode": "string",
}
It would be nice to have a configuration parameter to use lowerCamelCase instead:
{
"idAddress": 0,
"address": "string",
"city": "string",
"province": "string",
"state": "string",
"postalCode": "string",
}
Parameters are already written with underscore and they need to be written with point: db_name must be changed to db.name
Allow to send a locale to the translator function t()
. In the CustomTranslateExtension, just check if the argument is not null before setting the locale to get the translation:
self::$locale = I18nHelper::extractLocale(Security::getInstance()->getSessionKey(I18nHelper::PSFS_SESSION_LANGUAGE_KEY));
Check if file exits when generate module and don´t create it.
It'd be interesting that base/Service class allows xml request (apart from json and parameters chain ones) since nowadays it doesn't; going a little bit further, the result is always decoded supposing that it's always returned encoded (json).
It would be interesting to have methods to get info (curl_getinfo) and errors (curl_error, curl_errno) from the curl connection.
On the other hand, it's a bit confusing headers property in Service because it's used for nothing; it seems to be here to configure headers like CURLOPT_HTTPHEADER but this has to be configured as an option.
Dropdowns for ENUM properties don't work if api.field.case is set as camelName.
Your project contains files with permissive permissions. In order to avoid opening a security breach, you should restrict execution rights on following files:
- LICENSE
- README.md
- composer.json
- src/Dispatcher.php
- src/autoload.php
- src/base/Logger.php
- src/base/Request.php
- src/base/Router.php
- src/base/Security.php
- src/base/Singleton.php
- src/base/Template.php
- src/base/config/AdminForm.php
- src/base/config/Config.php
- src/base/config/ConfigForm.php
- src/base/config/LoginForm.php
- src/base/config/ModuleForm.php
- src/base/exception/ConfigException.php
- src/base/exception/FormException.php
- src/base/exception/LoggerException.php
- src/base/extension/AssetsNode.php
- src/base/extension/AssetsParser.php
- src/base/extension/AssetsTokenParser.php
- src/base/lib/CssMinifier.php
- src/base/lib/JsMinifier.php
- src/base/types/Controller.php
- src/base/types/Form.php
- src/base/types/interfaces/AuthInterface.php
- src/base/types/interfaces/ControllerInterface.php
- src/bootstrap.php
- src/templates/admin.html.twig
- src/templates/base.html.twig
- src/templates/forms/base.html.twig
- src/templates/forms/button.html.twig
- src/templates/forms/field.html.twig
- src/templates/generator/autoloader.template.twig
- src/templates/generator/controller.template.twig
- src/templates/generator/index.template.twig
- src/templates/index.html.twig
- src/templates/login.html.twig
- src/templates/modules.html.twig
- src/templates/redirect.html.twig
- src/templates/routing.html.twig
- src/templates/welcome.html.twig
chmod a-x 'LICENSE' \
'README.md' \
'composer.json' \
'src/Dispatcher.php' \
'src/autoload.php' \
'src/base/Logger.php' \
'src/base/Request.php' \
'src/base/Router.php' \
'src/base/Security.php' \
'src/base/Singleton.php' \
'src/base/Template.php' \
'src/base/config/AdminForm.php' \
'src/base/config/Config.php' \
'src/base/config/ConfigForm.php' \
'src/base/config/LoginForm.php' \
'src/base/config/ModuleForm.php' \
'src/base/exception/ConfigException.php' \
'src/base/exception/FormException.php' \
'src/base/exception/LoggerException.php' \
'src/base/extension/AssetsNode.php' \
'src/base/extension/AssetsParser.php' \
'src/base/extension/AssetsTokenParser.php' \
'src/base/lib/CssMinifier.php' \
'src/base/lib/JsMinifier.php' \
'src/base/types/Controller.php' \
'src/base/types/Form.php' \
'src/base/types/interfaces/AuthInterface.php' \
'src/base/types/interfaces/ControllerInterface.php' \
'src/bootstrap.php' \
'src/templates/admin.html.twig' \
'src/templates/base.html.twig' \
'src/templates/forms/base.html.twig' \
'src/templates/forms/button.html.twig' \
'src/templates/forms/field.html.twig' \
'src/templates/generator/autoloader.template.twig' \
'src/templates/generator/controller.template.twig' \
'src/templates/generator/index.template.twig' \
'src/templates/index.html.twig' \
'src/templates/login.html.twig' \
'src/templates/modules.html.twig' \
'src/templates/redirect.html.twig' \
'src/templates/routing.html.twig' \
'src/templates/welcome.html.twig'
Posted from SensioLabsInsight
There's an issue in the function isValid inside src/base/types/Form.php. It's only taken into account the last field in order to validate the form; also the token field is checked twice, one at the beginning of the function and another along with the rest of the fields, so that if the token field is valid, the whole form will be valid.
Describe the bug
PSFS doesn't work with [email protected]. It fails with error:
PHP Fatal error: Trait 'PSFS\base\types\traits\SingletonTrait' not found in .../vendor/psfs/core/src/base/Logger.php on line 30
Seems something related to the psr-4 section of composer.json of PSFS.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Local server runs without issues.
Screenshots
Desktop (please complete the following information):
Additional context
Allow users insert multiple row in one request
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.