Giter VIP home page Giter VIP logo

symfony-flex-backend's Introduction

What is this?

MIT licensed CI Coverage Status Psalm coverage Scrutinizer Code Quality Code Intelligence Status Maintainability Sonarcloud Quality Gate Sonarcloud Vulnerabilities Sonarcloud Vulnerabilities Sonarcloud Vulnerabilities OpenSSF Scorecard

JSON REST API which is build on top of Symfony framework.

This application is mean to use as an API that some frontend application(s) or different backend application(s) uses as they like.

Table of Contents

Requirements

Docker Engige If you are not using Docker Engine then follow this

Recommendations

  • *nix platform - most likely you're going to host your application on *nix platform - so I would recommend to do development also on that platform.
  • Makefile support - if you don't have this you need to look Makefile file to see what each make command is doing.

Installation

This installation guide expects that you're using Docker Engine.

1. Clone repository

Use your favorite IDE and get checkout from GitHub or just use following command

git clone https://github.com/tarlepp/symfony-flex-backend.git

2. Start containers

For this just run following command, which will start all the containers:

make start

If you like to start containers in background, then you can use following command:

make daemon

These commands will create following containers to run this backend application:

  • php (this is for actual application)
  • nginx (this will serve application)
  • mariadb (MariaDB 10.7 which will store all the data of application)
  • dozzle (to see your docker container logs)
  • adminer (to manage your database via browser)

3. Using application

By default make start command starts all the containers and exposes following ports on localhost on your host machine:

And this application is usable within your browser on https://localhost:8000 address. When you first time open that site you will see "Your connection is not private" warning - see this to resolve that.

Another choice is to use http://localhost:8080 which is not using SSL.

MariaDB credentials:

user: root
password: password

4. Getting shell to container

After you've run make start command you can list all running containers with docker ps command.

And to eg. get shell (bash or fish) access inside one of those containers you can run following command:

make bash

OR

make fish

5. Building containers

For time to time you probably need to build containers again. This is something that you should do everytime if you have some problems to get containers up and running. This you can do with following command:

make daemon-build

If you like to see containers logs directly use following command:

make start-build

Frontend?

So this is an API backend what about frontend then? No worries I've made simple Angular NgRx powered template frontend which work with this backend just out of the box.

Angular NgRx powered frontend template for Symfony backend

With these two template applications it should be quite easy to start to build your own application - right?

Resources

External links / resources

Authors

License

The MIT License (MIT)

Copyright © 2024 Tarmo Leppänen

symfony-flex-backend's People

Contributors

aleksikarhunen avatar antja0 avatar dependabot-preview[bot] avatar dependabot[bot] avatar helios-ag avatar javiereguiluz avatar ricardodevries avatar scrutinizer-auto-fixer avatar tarlepp avatar tarvainen 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  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  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  avatar  avatar  avatar  avatar  avatar

symfony-flex-backend's Issues

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/ecs/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/ecs/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

[Question] Block login on too many requests

Hi there,

is a feature like this planned in the project?
Something like

'failedLogin' => [
    'time_login'  => '10 minutes',     // When a user in this timespan ...
    'count'       => '5',              // ... has this many wrong login attempts, then block him ...
    'time_block'  => '10 minutes',     // ... for this timespan
],

So that the user can not log in more in the block time.
I have to implement such a feature in most of the frameworks myself but in the end it is a common thing to do.

All in all a really nice framework you are creating there. I have still problems understanding so much code for such a small feature set, but I am doing my best.
greeings and have a nice day :)

PS.: sry, but it seems, I can not tag it with the label "question" myself ...

OK, but incomplete, skipped, or risky tests!

I have made a test run and got the following result:
Any idea? I have already tried to delete the test-readable.log and re-test but still failed.
CENTOS 7.4 and PHP 7.2

OK, but incomplete, skipped, or risky tests!
Tests: 1997, Assertions: 4003, Skipped: 46.
PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/symfony-flex/symfony-flex-backend/var/log/test-readable.log" could not be opened: failed to open stream: Too many open files in /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /var/www/symfony-flex/symfony-flex-backend/vendor/easycorp/easy-log-handler/src/EasyLogHandler.php(38): Monolog\Handler\StreamHandler->write(Array)
#1 /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php(90): EasyCorp\EasyLog\EasyLogHandler->handleBatch(Array)
#2 /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php(106): Monolog\Handler\BufferHandler->flush()
#3 [internal function]: Monolog\Handler\BufferHandler->close()
#4 {main}
thrown in /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107

Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/symfony-flex/symfony-flex-backend/var/log/test-readable.log" could not be opened: failed to open stream: Too many open files in /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107
Stack trace:
#0 /var/www/symfony-flex/symfony-flex-backend/vendor/easycorp/easy-log-handler/src/EasyLogHandler.php(38): Monolog\Handler\StreamHandler->write(Array)
#1 /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php(90): EasyCorp\EasyLog\EasyLogHandler->handleBatch(Array)
#2 /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php(106): Monolog\Handler\BufferHandler->flush()
#3 [internal function]: Monolog\Handler\BufferHandler->close()
#4 {main}
thrown in /var/www/symfony-flex/symfony-flex-backend/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 107
make: *** [run-tests] Error 255

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpmetrics/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/infection/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Security Alert

symfony-flex-backend:master-08916f5fe266b3de54c484db4c4d43c3a6a55607 (debian 10.3)

Title Severity CVE Package Name Installed Version Fixed Version References
gnutls: DTLS client hello contains a random value of all zeroes MEDIUM CVE-2020-11501 libgnutls30 3.6.7-4+deb10u2 3.6.7-4+deb10u3 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11501
https://gitlab.com/gnutls/gnutls/-/commit/5b595e8e52653f6c5726a4cdd8fddeb6e83804d2
https://gitlab.com/gnutls/gnutls/-/issues/960
https://www.debian.org/security/2020/dsa-4652
https://www.gnutls.org/security-new.html#GNUTLS-SA-2020-03-31

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpunit/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpstan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Explanation roles

Can you explain what the different roles are and how the api key can be used or retrieved.
Me and my friend are kinda stuck on this.

When to use certain roles and how to properly use the anonymous role.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/ecs/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpunit/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpstan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Security Alert

symfony-flex-backend:377-9235db23b52ab502502b60b56908e52bcdc6772b (debian 10.3)

Title Severity CVE Package Name Installed Version Fixed Version References
gnutls: DTLS client hello contains a random value of all zeroes MEDIUM CVE-2020-11501 libgnutls30 3.6.7-4+deb10u2 3.6.7-4+deb10u3 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11501
https://gitlab.com/gnutls/gnutls/-/commit/5b595e8e52653f6c5726a4cdd8fddeb6e83804d2
https://gitlab.com/gnutls/gnutls/-/issues/960
https://www.debian.org/security/2020/dsa-4652
https://www.gnutls.org/security-new.html#GNUTLS-SA-2020-03-31

[Question] Composer install for Production

Hey @tarlepp,

Started trying to deploy this to my production environment and run into some issues with composer install --no-dev

It looks like you have some scripts that run which require some of the binaries from the require-dev dependancies. Wondering if you've used this in production and if so, what you do for composer builds.

Specifically the security checker and the requirements-checker were not there when installing without composer dependancies. Before I start messing with this too much, wanted to see your thoughts.

Thanks!

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/infection/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

[Question] MitM protection present?

Is there a MitM protection present in the authentication or planned?
The JWT Tokens are valid for 1 day, so an attacker maybe only can use a stolen token in this period, quite a long one.
But in the encryption of the JWT token there is no validation in order to pin the token to a special IP, or a computer, or browser with it's version, ...
Or do I just don't see it?
Can the token be stolen and used from an other app?

PS.: sry for asking, but I couldn't find any documentation for this in your code or the not existing wiki.
Also I am not able to set the "question" label.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpmetrics/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Help me please, I can not do à Post Request for a new make:rest-api resource

Hello,
Thank you for your Code, Please help me i install the app and i do ./bin/console make:rest-api to create All of things for a Category Entity. So when i try in PostMan GET is Good but POST i have an error suc as

{
"message": "Argument 3 passed to Symfony\Component\HttpKernel\Exception\HttpException::__construct() must be an instance of Exception or null, instance of TypeError given, called in /Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/RestMethodHelper.php on line 288",
"code": 0,
"status": 500,
"debug": {
"exception": "Symfony\Component\Debug\Exception\FatalThrowableError",
"file": "/Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/Exception/HttpException.php",
"line": 24,
"message": "Argument 3 passed to Symfony\Component\HttpKernel\Exception\HttpException::__construct() must be an instance of Exception or null, instance of TypeError given, called in /Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/RestMethodHelper.php on line 288",
"trace": [
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/RestMethodHelper.php",
"line": 288,
"function": "__construct",
"class": "Symfony\Component\HttpKernel\Exception\HttpException",
"type": "->",
"args": [
400,
"Return value of App\Rest\RestResource::getFormTypeClass() must be of the type string, null returned",
{},
[],
400
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/RestMethodHelper.php",
"line": 189,
"function": "determineOutputAndStatusCodeForRestMethodException",
"class": "App\Rest\Controller",
"type": "->",
"args": [
{}
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/Methods/CreateMethod.php",
"line": 61,
"function": "handleRestMethodException",
"class": "App\Rest\Controller",
"type": "->",
"args": [
{}
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/Actions/User/CreateAction.php",
"line": 60,
"function": "createMethod",
"class": "App\Controller\TestController",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/HttpKernel.php",
"line": 149,
"function": "createAction",
"class": "App\Controller\TestController",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
{}
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/HttpKernel.php",
"line": 66,
"function": "handleRaw",
"class": "Symfony\Component\HttpKernel\HttpKernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/Kernel.php",
"line": 188,
"function": "handle",
"class": "Symfony\Component\HttpKernel\HttpKernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1,
true
]
},
{
"file": "/Users/TANDJIEKPON/Sites/soccerDev/public/index.php",
"line": 71,
"function": "handle",
"class": "Symfony\Component\HttpKernel\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
}
],
"traceString": "#0 /Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/RestMethodHelper.php(288): Symfony\Component\HttpKernel\Exception\HttpException->__construct(400, 'Return value of...', Object(TypeError), Array, 400)\n#1 /Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/RestMethodHelper.php(189): App\Rest\Controller->determineOutputAndStatusCodeForRestMethodException(Object(TypeError))\n#2 /Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/Methods/CreateMethod.php(61): App\Rest\Controller->handleRestMethodException(Object(TypeError))\n#3 /Users/TANDJIEKPON/Sites/soccerDev/src/Rest/Traits/Actions/User/CreateAction.php(60): App\Controller\TestController->createMethod(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\Form\FormFactory))\n#4 /Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/HttpKernel.php(149): App\Controller\TestController->createAction(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\Form\FormFactory))\n#5 /Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/HttpKernel.php(66): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)\n#6 /Users/TANDJIEKPON/Sites/soccerDev/vendor/symfony/http-kernel/Kernel.php(188): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#7 /Users/TANDJIEKPON/Sites/soccerDev/public/index.php(71): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))\n#8 {main}"
}
}

I just want to send {"name":"xxxx"} to populate the table.
Can you help me please

NelmioApiDocBundle Twig Controller not found

I downloaded the original code and set it up like descriped in the README.md.
The authentication token are working fine and the routes also behave normal.
But the routes /api/doc/ and /api/doc.json generate this error:

{
  "message": "Class twig.controller.preview_error does not exist",
  "code": -1,
  "status": 500,
  "debug": {
    "exception": "ReflectionException",
    "file": "/htdocs/backend/htdocs/src/Rest/Describer/ApiDocDescriber.php",
    "line": 164,
    "message": "Class twig.controller.preview_error does not exist",
    "trace": [
      ...
    ]
  }
}

The /config/routes/nelmio_api_doc.yaml is not modified:

NelmioApiDocBundleUi:
    resource: "@NelmioApiDocBundle/Resources/config/routing/swaggerui.xml"
    prefix:   /api/doc

NelmioApiDocBundle:
    path: /api/doc.json
    methods: GET
    defaults: { _controller: nelmio_api_doc.controller.swagger }

What am I missing?
Or is this a bug in the current state?

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/php-coveralls/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpinsights/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/psalm/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

[Question] What is included?

Hi,

thank you for that awesome example project.

I would like to know, what is exactly inlcuded?

Also, this project seems to be huge. What are the really basics I need for an JSON REST API with user management?

Thanks in advice :-)

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phan/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/php-coveralls/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

[Question] REST Trait and composer update question

Hello @tarlepp - thank you for the amazing project.

Overview of problem

I'm using the REST Traits but upon POSTing a new record in (hitting the createAction) throws an HttpException but only after displaying this deprecated message User Deprecated: Doctrine\Common\ClassLoader is deprecated. - after that message/exception, then I see this exception:

exception:
      class: Symfony\Component\Debug\Exception\FatalThrowableError
      message: 'Argument 3 passed to Symfony\Component\HttpKernel\Exception\HttpException::__construct() must be an instance of Exception or null, instance of TypeError given, called in /var/www/symfony/src/Rest/Traits/RestMethodHelper.php on line 289'
      code: 0
      file: /var/www/symfony/vendor/symfony/http-kernel/Exception/HttpException.php
      line: 24
      trace: "#0 /var/www/symfony/src/Rest/Traits/RestMethodHelper.php(289): Symfony\\Component\\HttpKernel\\Exception\\HttpException->__construct(400, 'Return value of...', Object(TypeError), Array, 400)\n#1 /var/www/symfony/src/Rest/Traits/RestMethodHelper.php(190): App\\Rest\\Controller->determineOutputAndStatusCodeForRestMethodException(Object(TypeError))\n#2 /var/www/symfony/src/Rest/Traits/Methods/CreateMethod.php(61): App\\Rest\\Controller->handleRestMethodException(Object(TypeError))\n#3 /var/www/symfony/src/Rest/Traits/Actions/User/CreateAction.php(60): App\\Controller\\MyCustomController->createMethod(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Symfony\\Component\\Form\\FormFactory))\n#4 /var/www/symfony/vendor/symfony/http-kernel/HttpKernel.php(149): App\\Controller\\MyCustomController->createAction(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Symfony\\Component\\Form\\FormFactory))\n#5 /var/www/symfony/vendor/symfony/http-kernel/HttpKernel.php(66): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#6 /var/www/symfony/vendor/symfony/http-kernel/Kernel.php(188): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#7 /var/www/symfony/public/index.php(66): Symfony\\Component\\HttpKernel\\Kernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#8 {main}"

Some quick research pointed me to replacing doctrine/common with the individual packages needed but something tells me this isn't right. Although I've tried updating dependencies and had no luck there either.

My Environment

I'm using a docker environment (which is slightly tweaked from this repo https://github.com/eko/docker-symfony - I replaced the fpm container with this https://gist.github.com/OGProgrammer/f143b2b0c889c67f512f757cdcdbcbc3 ) and I'm running PHP 7.2.8

Questions

  • 1st Question - Is there something I'm missing about using these Traits? I'm debating ditching them and just writing the routes by hand in my controller as another route I wrote works inside the controller just fine.

  • 2nd Question - Running composer update throws an error also once I hit the phpstan section. I tried bumping my memory limit up cause that was my first problem I ran into but then hit this:

Changed current directory to vendor-bin/phpstan
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed
Script @composer bin all update --ansi handling the post-update-cmd event returned with error code 137

Anything special needed for a composer/update?

Thank you and let me know if I can provide any more detail.

Api doc generation

Hello, is it possible to put form schema into requests? At this moment I have no informations in api doc what to send when creating new entity.

Update ?

Hello there,
this project is very nice.
I want to use it for my own projects.
How can I update the project after I install it and use it in my own repo?

Security Alert

symfony-flex-backend:master (debian 10.3)

Title Severity CVE Package Name Installed Version Fixed Version References
gnutls: DTLS client hello contains a random value of all zeroes MEDIUM CVE-2020-11501 libgnutls30 3.6.7-4+deb10u2 3.6.7-4+deb10u3 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11501
https://gitlab.com/gnutls/gnutls/-/commit/5b595e8e52653f6c5726a4cdd8fddeb6e83804d2
https://gitlab.com/gnutls/gnutls/-/issues/960
https://www.debian.org/security/2020/dsa-4652
https://www.gnutls.org/security-new.html#GNUTLS-SA-2020-03-31

utf8mb4 gives problems with MySQL

`

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key
was t
oo long; max key length is 767 bytes

In PDOConnection.php line 109:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key
was t
oo long; max key length is 767 bytes

In PDOConnection.php line 107:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key
was t
oo long; max key length is 767 bytes

`

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/phpinsights/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/psalm/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Anonymous api requests

Hi, i'm trying to make certain api requests public so everyone can make a request to this endpoint.
I've found an anonymous constant but it's not working for a new generated api endpoint.

Am I doing this wrong or isn't there a way to make a request to the api anonymously.

PS: great great great work on this with all the features!

Dependabot couldn't find a composer.json for this project

Dependabot couldn't find a composer.json for this project.

Dependabot requires a composer.json to evaluate your project's current PHP dependencies. It had expected to find one at the path: /vendor-bin/ecs/composer.json.

If this isn't a PHP project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

Security Alert

symfony-flex-backend:master-5f71215ce521eb99917daa82281c86dec8981e53 (debian 10.3)

Title Severity CVE Package Name Installed Version Fixed Version References
gnutls: DTLS client hello contains a random value of all zeroes MEDIUM CVE-2020-11501 libgnutls30 3.6.7-4+deb10u2 3.6.7-4+deb10u3 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11501
https://gitlab.com/gnutls/gnutls/-/commit/5b595e8e52653f6c5726a4cdd8fddeb6e83804d2
https://gitlab.com/gnutls/gnutls/-/issues/960
https://www.debian.org/security/2020/dsa-4652
https://www.gnutls.org/security-new.html#GNUTLS-SA-2020-03-31

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.