Using groups break
mnsami opened this issue · comments
First of all, thank you so much for all the work done within this package.
It has better handling than FOSUserBundle.
I appreciate the effort.
Packages
$ composer show --latest
brick/math 0.9.1 0.9.1 Arbitrary-precision arithmetic library
composer/package-versions-deprecated 1.11.99 1.11.99 Composer plugin that provides efficient querying for installed package versions (no runtime IO)
doctrine/annotations 1.11.1 1.11.1 Docblock Annotations Parser
doctrine/cache 1.10.2 1.10.2 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.
doctrine/collections 1.6.7 1.6.7 PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common 2.13.3 3.0.2 PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and much more.
doctrine/dbal 2.12.0 2.12.0 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/doctrine-bundle 2.1.2 2.1.2 Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle 3.0.1 3.0.1 Symfony DoctrineMigrationsBundle
doctrine/event-manager 1.1.1 1.1.1 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector 1.4.3 2.0.3 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.
doctrine/instantiator 1.3.1 1.3.1 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer 1.2.1 1.2.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations 3.0.1 3.0.1 PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a p...
doctrine/orm 2.7.4 2.7.4 Object-Relational-Mapper for PHP
doctrine/persistence 1.3.8 2.1.0 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/reflection 1.2.2 1.2.2 The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some additional functionality on top of the reflection functionality that comes with PHP. It allows you to get the...
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
doctrine/sql-formatter 1.1.1 1.1.1 a PHP SQL highlighting library
egulias/email-validator 2.1.23 2.1.23 A library for validating emails against several RFCs
friendsofsymfony/rest-bundle 3.0.3 3.0.3 This Bundle provides various tools to rapidly develop RESTful API's with Symfony
jms/metadata 2.3.0 2.3.0 Class/method/property metadata management in PHP
jms/serializer 3.9.0 3.10.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.
jms/serializer-bundle 3.7.0 3.7.0 Allows you to easily serialize, and deserialize data of any complexity
laminas/laminas-code 3.4.1 3.4.1 Extensions to the PHP Reflection API, static code scanning, and code generation
laminas/laminas-eventmanager 3.3.0 3.3.0 Trigger and listen to events within a PHP application
laminas/laminas-zendframework-bridge 1.1.1 1.1.1 Alias legacy ZF class names to Laminas Project equivalents.
league/tactician v1.0.3 v1.0.3 A small, flexible command bus. Handy for building service layers.
league/tactician-bundle v1.2.0 v1.2.0 Bundle to integrate Tactician with Symfony projects
league/tactician-container 2.0.0 2.0.0 Tactician integration for any container implementing PSR-11
league/tactician-logger v0.10.0 v0.10.0 Adds PSR-3 logging support to the Tactician command bus
mnsami/command-bus 2.0 2.0 Very simple command-bus implementation
monolog/monolog 1.25.5 2.1.1 Sends your logs to files, sockets, inboxes, databases and various web services
nikic/php-parser v4.10.2 v4.10.2 A PHP parser written in PHP
nucleos/user-bundle 1.4.0 1.4.0 Lightweight user management for symfony
nyholm/psr7 1.3.1 1.3.1 A fast PHP7 implementation of PSR-7
ocramius/proxy-manager 2.9.1 2.9.1 A library providing utilities to generate, instantiate and generally operate with Object Proxies
php-http/message-factory v1.0.2 v1.0.2 Factory interfaces for PSR-7 HTTP Message
psr/cache 1.0.1 1.0.1 Common interface for caching libraries
psr/container 1.0.0 1.0.0 Common Container Interface (PHP FIG PSR-11)
psr/http-factory 1.0.1 1.0.1 Common interfaces for PSR-7 HTTP message factories
psr/http-message 1.0.1 1.0.1 Common interface for HTTP messages
psr/log 1.1.3 1.1.3 Common interface for logging libraries
ramsey/collection 1.1.1 1.1.1 A PHP 7.2+ library for representing and manipulating collections.
ramsey/uuid 4.1.1 4.1.1 A PHP library for generating and working with universally unique identifiers (UUIDs).
sensio/framework-extra-bundle v5.6.1 v5.6.1 This bundle provides a way to configure your controllers with annotations
symfony/cache v4.4.16 v5.1.8 Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts v2.2.0 v2.2.0 Generic abstractions related to caching
symfony/config v4.4.16 v5.1.8 Symfony Config Component
symfony/console v4.4.16 v5.1.8 Symfony Console Component
symfony/debug v4.4.16 v4.4.16 Symfony Debug Component
symfony/dependency-injection v4.4.16 v5.1.8 Symfony DependencyInjection Component
symfony/doctrine-bridge v4.4.15 v5.1.8 Symfony Doctrine Bridge
symfony/dotenv v4.4.15 v5.1.8 Registers environment variables from a .env file
symfony/error-handler v4.4.16 v5.1.8 Symfony ErrorHandler Component
symfony/event-dispatcher v4.4.16 v5.1.8 Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.9 v2.2.0 Generic abstractions related to dispatching event
symfony/filesystem v4.4.16 v5.1.8 Symfony Filesystem Component
symfony/finder v4.4.16 v5.1.8 Symfony Finder Component
symfony/flex v1.9.10 v1.10.0 Composer plugin for Symfony
symfony/form v4.4.16 v5.1.8 Symfony Form Component
symfony/framework-bundle v4.4.16 v5.1.8 Symfony FrameworkBundle
symfony/http-client-contracts v2.3.1 v2.3.1 Generic abstractions related to HTTP clients
symfony/http-foundation v4.4.16 v5.1.8 Symfony HttpFoundation Component
symfony/http-kernel v4.4.16 v5.1.8 Symfony HttpKernel Component
symfony/inflector v4.4.16 v5.1.8 Symfony Inflector Component
symfony/intl v4.4.16 v5.1.8 A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/mailer v4.4.16 v5.1.8 Symfony Mailer Component
symfony/maker-bundle v1.22.0 v1.23.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.
symfony/mime v4.4.16 v5.1.8 A library to manipulate MIME messages
symfony/monolog-bridge v4.4.15 v5.1.8 Symfony Monolog Bridge
symfony/monolog-bundle v3.6.0 v3.6.0 Symfony MonologBundle
symfony/options-resolver v4.4.16 v5.1.8 Symfony OptionsResolver Component
symfony/polyfill-intl-icu v1.20.0 v1.20.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn v1.20.0 v1.20.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer v1.20.0 v1.20.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring v1.20.0 v1.20.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72 v1.20.0 v1.20.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73 v1.20.0 v1.20.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.20.0 v1.20.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/property-access v4.4.16 v5.1.8 Symfony PropertyAccess Component
symfony/routing v4.4.16 v5.1.8 Symfony Routing Component
symfony/security-bundle v4.4.16 v5.1.8 Symfony SecurityBundle
symfony/security-core v4.4.16 v5.1.8 Symfony Security Component - Core Library
symfony/security-csrf v4.4.16 v5.1.8 Symfony Security Component - CSRF Library
symfony/security-guard v4.4.16 v5.1.8 Symfony Security Component - Guard
symfony/security-http v4.4.16 v5.1.8 Symfony Security Component - HTTP Integration
symfony/service-contracts v2.2.0 v2.2.0 Generic abstractions related to writing services
symfony/stopwatch v4.4.15 v5.1.8 Symfony Stopwatch Component
symfony/translation v4.4.16 v5.1.8 Symfony Translation Component
symfony/translation-contracts v2.3.0 v2.3.0 Generic abstractions related to translation
symfony/twig-bridge v4.4.16 v5.1.8 Symfony Twig Bridge
symfony/twig-bundle v4.4.16 v5.1.8 Symfony TwigBundle
symfony/validator v4.4.16 v5.1.8 Symfony Validator Component
symfony/var-dumper v4.4.16 v5.1.8 Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter v4.4.16 v5.1.8 A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/yaml v4.4.15 v5.1.8 Symfony Yaml Component
twig/extra-bundle v3.1.0 v3.1.1 A Symfony bundle for extra Twig extensions
twig/twig v3.1.1 v3.1.1 Twig, the flexible, fast, and secure template language for PHP
webimpress/safe-writer 2.1.0 2.1.0 Tool to write files safely, to avoid race conditions
willdurand/jsonp-callback-validator v1.1.0 v1.1.0 JSONP callback validator.
willdurand/negotiation v2.3.1 v2.3.1 Content Negotiation tools for PHP provided as a standalone library.
PHP version
PHP 7.4.12 (cli) (built: Oct 29 2020 22:49:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies
with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans
Subject
I'm adding Group
support to my project.
But after adding/configuring the Group
Entity as below
namespace App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Nucleos\UserBundle\Model\Group as BaseGroup;
/**
* @ORM\Entity
* @ORM\Table(name="groups")
*/
class Group extends BaseGroup
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
}
I get the below error
Cannot autowire service "App\Entity\User\Group": argument "$name" of method "Nucleos\UserBundle\Model\Group::__construct()" is type-hinted "string", you should configure its value explicitly.
Here is the package configuration as well
nucleos_user:
db_driver: orm
firewall_name: main
from_email: '%env(MAIL_SENDER)%'
user_class: 'App\Entity\User\User'
group:
group_class: App\Entity\User\Group
Steps to reproduce
- Fresh project setup with installing of the
nucleos/user-bundle
setup.
Expected results
- Have groups setup with no problems
Actual results
I would expect to work as pointed out in the docs.
Am I configuring it in a wrong way ?
Thanks !
It looks like you have some misconfiguration in your services.yaml
. Something like this:
services:
_defaults:
autowire: true
autoconfigure: true
# The following line is invalid!
App\Entity\:
resource: '../src/Entity'
thank you @core23 .. that fixed it, I missed it