libgraviton / graviton Goto Github PK
View Code? Open in Web Editor NEWA Symfony based framework to generate REST services from JSON service definition files.
Home Page: https://docs.graviton.scbs.ch
License: MIT License
A Symfony based framework to generate REST services from JSON service definition files.
Home Page: https://docs.graviton.scbs.ch
License: MIT License
Dependabot can't resolve your PHP dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Dependabot's installed extensions didn't match those required by your application. Please add the following extensions to the platform config in your composer.json: ext-mongodb.
The full error raised was:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-mongodb ^1.4.0 is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
- alcaeus/mongo-php-adapter 1.1.5 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- alcaeus/mongo-php-adapter 1.1.5 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for alcaeus/mongo-php-adapter (locked at 1.1.5, required as ^1.1.5) -> satisfiable by alcaeus/mongo-php-adapter[1.1.5].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/15-xml.ini
- /etc/php/7.2/cli/conf.d/20-bcmath.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-curl.ini
- /etc/php/7.2/cli/conf.d/20-dom.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gd.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-gmp.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-igbinary.ini
- /etc/php/7.2/cli/conf.d/20-imagick.ini
- /etc/php/7.2/cli/conf.d/20-intl.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-ldap.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-redis.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-simplexml.ini
- /etc/php/7.2/cli/conf.d/20-soap.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
- /etc/php/7.2/cli/conf.d/20-wddx.ini
- /etc/php/7.2/cli/conf.d/20-xdebug.ini
- /etc/php/7.2/cli/conf.d/20-xmlreader.ini
- /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.2/cli/conf.d/20-xsl.ini
- /etc/php/7.2/cli/conf.d/20-zip.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
You can mention @dependabot in the comments below to contact the Dependabot team.
I need to get all file resources having a specific $ref within their links array. However, the following request does always return an empty result:
http://graviton-develop.nova.scapp.io/file/?eq(links.%24ref,%2Fcore%2Fapp%2Fadmin)
Same for http://graviton-develop.nova.scapp.io/file/?like(links.%24ref,*).
But when you execute http://graviton-develop.nova.scapp.io/file/?eq(links.type,user), you'll see that these requests should return at least one result.
Do I send wrong requests or is there a bug affecting filtering by $ref within array?
Here are some scripts I have been using to test this:
#!/bin/sh
# generatortest.sh
php app/console graviton:generate:bundle --namespace=Graviton/FooBundle --dir=src --bundle-name=GravitonFooBundle --no-interaction
php app/console graviton:generate:resource --entity=GravitonFooBundle:Bar --format=xml --fields="name:string" --with-repository --no-interaction
php app/console graviton:generate:resource --entity=GravitonFooBundle:Baz --format=xml \
--fields="name:string isTrue:boolean consultant:Graviton\\PersonBundle\\Document\\Consultant valid:boolean contacts:Graviton\\PersonBundle\\Document\\PersonContact[] tags:array" \
--with-repository --no-interaction
./vendor/bin/php-cs-fixer fix src/Graviton/FooBundle
#!/bin/sh
# revert-generate.sh
rm -rf src/Graviton/FooBundle
git checkout src/Graviton/CoreBundle/GravitonCoreBundle.php
The code for the generator is in the feature/generator-bundle
Known TODOs:
GravitonFooBundle:Baz
aboveResources/config/schema/
(currently @todo are being generated)validation.xml
Mongo db name in Dynamic Bundle generator must be get from Parameter, at the moment it's hard coded..
We should move these into GRVs.
/core/app/hello/settings/<key>
)X-Version
header and act accordingly, allow both sides of the comms to specify a version constraint and define behaivour when said constraint is violated)202 Accepted
for when backends go missing)PATCH
verbDependabot can't resolve your PHP dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Dependabot's installed extensions didn't match those required by your application.
Please add the following extensions to the platform config in your composer.json to allow Dependabot to run: ext-mongodb.
The full error raised was:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-mongodb ^1.4.0 is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
- alcaeus/mongo-php-adapter 1.1.5 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- alcaeus/mongo-php-adapter 1.1.5 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for alcaeus/mongo-php-adapter (locked at 1.1.5, required as ^1.1.5) -> satisfiable by alcaeus/mongo-php-adapter[1.1.5].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/15-xml.ini
- /etc/php/7.2/cli/conf.d/20-bcmath.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-curl.ini
- /etc/php/7.2/cli/conf.d/20-dom.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gd.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-gmp.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-igbinary.ini
- /etc/php/7.2/cli/conf.d/20-imagick.ini
- /etc/php/7.2/cli/conf.d/20-intl.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-ldap.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-msgpack.ini
- /etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-redis.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-simplexml.ini
- /etc/php/7.2/cli/conf.d/20-soap.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sqlite3.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
- /etc/php/7.2/cli/conf.d/20-wddx.ini
- /etc/php/7.2/cli/conf.d/20-xdebug.ini
- /etc/php/7.2/cli/conf.d/20-xmlreader.ini
- /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.2/cli/conf.d/20-xsl.ini
- /etc/php/7.2/cli/conf.d/20-zip.ini
- /etc/php/7.2/cli/conf.d/25-memcached.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
You can mention @dependabot in the comments below to contact the Dependabot team.
Stack traceL
Warning: strpos() expects parameter 1 to be string, array given
in src/Graviton/RestBundle/Listener/PagingLinkResponseListener.php at line 131
...
/openapi.yaml
or /openapi.json
. Additionally, each service exposes its schema at /schema[service/endpoint]/openid.[json|yaml]
. There is no more item
or collection
schema as previously, only one schema per service./i18n/language
service decided which languages are available in Graviton. This service does not exist anymore, the language list is now a parameter. (graviton.translator.languages
)translatable
are now generated with the configured language list and are expected to be objects in the MongoDB database./i18n/translation
service does not exist anymore. Anything related to translating of strings in objects during serializing has been removed.ENV
variables starting with SYMFONY__
is dropped. Those are not parsed anymore.variation
s and schema groups
(properties onVariation
and groups
) in service definitions are not supported anymore, no replacement exists.x-dynamic-key
feature in service defintions are not supported anymore. You need to remove those. There is no replacement, just define your keys statically.collection
attribute in extref
definitions can only refer to exposed services which have a routerBase
. As the routerBase
is necessary to build the validation extref, they need to be exposed.translatable
objects are now as-is and passed to MongoDB untouched. before, there were cases where RQL queries on translatable
s were changed internally and would match different languages even when only 1 language is passed. this is not done anymore.translatable
s: if there is a translatable object name
, rql queries must now target an property on that object. So the rql query eq(name,string:value)
will not match anymore! It must be eq(name.en,string:value)
.RestController
: There is no more getResponse()
function - just create your own instance. Also, $this->container
or getContainer()
is not available anymore as this pattern is deperacted. Use dependency injection to inject needed components.extref
field was sent with an URL pointing to a non-existing service, null
was inserted in to the database (effectively resulting in a data loss without knowing it). Now if you try to save that, an Exception
will be rendered and a Bad Request
(status 400
) response will be returned.required: true
in the field definition will now be accepted if filled with an empty value for compatible types (like ''
for type string
)! If you don't want that, you should add the NotNull
constraint to your field definition!POST/PUT/PATCH
requests. Note that the schema of the error responses is also included in the openapi documentation.(Services, that have a filed with recordOriginException: true
in their definition)
datetime
fields has changed. In order to validate data correctly, you need to send all datetime
values in the same timezone you received it. If you change timezone, it will be picked up as a modification and a validation error will be raised if changed on a protected field.(Services, that have versioning: true
in service definition)
POST
/PUT
is rejected because of a wrong version
value, the X-Current-Version
response header is not returned anymore. Instead, you should re-GET
the resource using ?select(version)
and use that value.PATCH
request to a versioning: true
endpoint and you do not send the version in your PATCH
; the existing version in the database is read and validated. Thus, no version check is performed (= it will never complain about a version mismatch)./file
) servicemetadata
properties size, filename, hash, mime
everytime you upload a new file either to an existing resource or new resource. It follows the simple logic: If the uploaded file is modified, the metadata will be updated.Content-type: application/json
request to the affected file
resource and send your metadata. The metadata will be untouched until a new file is uploaded./file
service are now clearly outlined in the openapi documentation and it can be (and is) validated against. You can upload files either by a pure data POST
, multipart
or form-data
requests.id
of a resource, you must use PUT
. If you POST
json content with an "id"
property in it to /file/
, the request will fail.PUT /core/app/example
and the record does not already exist, the create
event will be published (document.app.app.create
on queue) - otherwise the update
(document.app.app.update
on queue) event will be published.PUT
did always cause a update
event, even when the entity didn't exist yet.TODO
CompilerPasses
can be deleted now in DocumentBundle
?graviton.document.eventmap
param? this is generated for a map for event names for EventStatusLinkListener -> if removed, we can also remove param graviton.document.type.extref.mapping
"nullable": true,
in mostly all attributes? what do the tests do if we remove it?NotNull
constraint, often used in cons bundle - is this asserted in tests? is it still applied?EmbedTestHashAsEmbedded
- it defines subobjects with an exposed id
attribute - is this still correctly exposed? should have id
in schema of subobjects.Graviton\RabbitMqBundle\Controller\StatusUpdateController
- is used by worker-base!setIsUseSecondary
setting in QueryService
still work? -> is set in RuntimeDefinition
but needs to appliedQueryService
is full of side-effects, not clearly scoped!Graviton\DocumentBundle\Serializer\Subscriber\DoctrineProxySubscriber
be removed?Dependabot can't resolve your PHP dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Dependabot's installed extensions didn't match those required by your application.
Please add the following extensions to the platform config in your composer.json to allow Dependabot to run: ext-mongodb.
The full error raised was:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-mongodb ^1.4.0 is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
- alcaeus/mongo-php-adapter 1.1.5 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- alcaeus/mongo-php-adapter 1.1.5 requires ext-mongodb ^1.2.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for alcaeus/mongo-php-adapter (locked at 1.1.5, required as ^1.1.5) -> satisfiable by alcaeus/mongo-php-adapter[1.1.5].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/15-xml.ini
- /etc/php/7.2/cli/conf.d/20-apcu.ini
- /etc/php/7.2/cli/conf.d/20-bcmath.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-curl.ini
- /etc/php/7.2/cli/conf.d/20-dom.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gd.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-gmp.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-igbinary.ini
- /etc/php/7.2/cli/conf.d/20-imagick.ini
- /etc/php/7.2/cli/conf.d/20-intl.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-ldap.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-msgpack.ini
- /etc/php/7.2/cli/conf.d/20-pdo_sqlite.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-redis.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-simplexml.ini
- /etc/php/7.2/cli/conf.d/20-soap.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sqlite3.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
- /etc/php/7.2/cli/conf.d/20-wddx.ini
- /etc/php/7.2/cli/conf.d/20-xdebug.ini
- /etc/php/7.2/cli/conf.d/20-xmlreader.ini
- /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.2/cli/conf.d/20-xsl.ini
- /etc/php/7.2/cli/conf.d/20-zip.ini
- /etc/php/7.2/cli/conf.d/25-apcu_bc.ini
- /etc/php/7.2/cli/conf.d/25-memcached.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
You can mention @dependabot in the comments below to contact the Dependabot team.
Definition:
submit(): Used to manually submit a form (e.g. HTTP method has to be checked manually)
handleRequest(): Handles the form submission automatically (e.g. HTTP method is checked automatically)
see http://symfony.com/doc/current/cookbook/form/direct_submit.html
Wrong:
// ...
$form->handleRequest($request);
$form->submit(json_decode(str_replace('"$ref"', '"ref"', $request->getContent()), true), false);
// ...
Actually, I think Symfony should throw an Exception when calling submit() after handleRequest() was called.
Correct:
// ...
$form->submit(json_decode(str_replace('"$ref"', '"ref"', $request->getContent()), true), false);
// ...
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.