Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next release #336

Open
ksn135 opened this issue Jun 2, 2024 · 9 comments
Open

Next release #336

ksn135 opened this issue Jun 2, 2024 · 9 comments

Comments

@ksn135
Copy link
Contributor

ksn135 commented Jun 2, 2024

Hi, everyone!

Haven't been here for a few years, but I'm back to my favorite bundle and want to build a new project on it.
A few questions, probably for @cedriclombardot

  1. Why is there a php 8.1 restriction in composer.json?
  2. Is there support for Symfony 7.0? Is there a transition plan?
  3. Any plans to support AssetMapper? What is preventing this from happening?

I have some free time right now and am willing to invest it in this project, what can I help with?
Just say.

@bobvandevijver
Copy link
Member

Hi! I haven't seen any activity from @cedriclombardot for quite some time in this repository, but I currently maintain this repository with @tobias-93. To answer you questions:

  1. PHP 8.1 is the minimum required version. Older versions of PHP are out of security support and shouldn't be used anyways.
  2. The bundle works perfectly fine with 6.4, so I believe 7.x should also work fine. But it hasn't been tested yet. However, I am open to drop the maximum Symfony constraint from composer.json
  3. There are no plans to support asset mapper. Haven't put much research into it, so I do not know whether there is something blocking that.

@ksn135
Copy link
Contributor Author

ksn135 commented Jun 3, 2024

It took me all weekend to figure it out.

  1. on php 8.3 just works
  2. installed on Symfony v6.4.7
  3. the plus point of AssetMapper is that you don't need node_modules, bower, nodejs and build process. (I'll get to that later).

From what I noticed:

  1. really liked the generate_base_in_project_dir option
  2. now after the command ```admin:generate-admin`` doesn't it automatically update routes?
  3. The AgrosupDijon-DSI/BreadcrumbBundle (cnerta/breadcrumb-bundle) is not maintained and outdated.
    Right now made a fork and trying to install it.

"to be continued"

@bobvandevijver
Copy link
Member

I do know about the benefits of AssetMapper, just don't know what would be blocking for this bundle. And as we are using webpack in our project that uses this bundle, it hasn't been an issue for us so far. By the way, while bower is still in the repo files, it is not required to use (we don't).

really liked the generate_base_in_project_dir option

This is nice to hear, it has solved a lot of issues for us as well.

now after the command admin:generate-admin doesn't it automatically update routes?

We have indeed removed that, so you decide for yourself where to put it. We are using something like this:

return static function (RoutingConfigurator $routing): void {
  $addAdminRouting = function (
    string $name,
    string $path,
    string $controllerClass,
    string $namespace,
    ?array $options = null,
  ) use ($routing): void {
    $indexRoute = $routing->add($name, $path);
    $indexRoute->controller([$controllerClass, 'indexAction']);
    if ($options) {
      $indexRoute->options($options);
    }

    $routing
      ->import($namespace, 'admingenerator')
      ->prefix($path);
  };

  $addAdminRouting(
    'admingenerator_activity',
    '/activity',
    ListController::class,
    '@IdbAdminGeneratorBundle/Controller/AdminActivity/',
  );
}

The AgrosupDijon-DSI/BreadcrumbBundle (cnerta/breadcrumb-bundle) is not maintained and outdated.

Another thing we do not use at all :)

The bundle could benefit from a complete overhaul (things such as routing configuration), but that would take a lot more work than we currently have the time for. It is basically in maintenance mode, and we make sure that it keeps working for at least our project.

@ksn135
Copy link
Contributor Author

ksn135 commented Jun 3, 2024

We have indeed removed that, so you decide for yourself where to put it. We are using something like this:

Oh, hmmm... Where does it, pardon me, needs to be inserted? )

Can't it be specified in the routing.yml file the good old fashioned way, like it used to be?
Example, from the old system:

contractor_kind:
    resource: “@Ksn135CompanyBundle/Controller/ContractorKind/”
    type: admingenerator
    prefix: /budget/admin/contractor/kind

@ksn135
Copy link
Contributor Author

ksn135 commented Jun 3, 2024

The bundle could benefit from a complete overhaul (things such as routing configuration), but that would take a lot more work than we currently have the time for. It is basically in maintenance mode, and we make sure that it keeps working for at least our project.

I have similar goals to upgrade a live working project (300+ active users, database over 1000 tables) to current versions of php, Symfony, Doctrine and s2a and continue to maintain it.
There are practically no full-fledged alternatives to s2a, EasyAdmin is good, BUT there are problems with extensibility:

  1. almost all classes defined as final
  2. proposed PRs with new features hang for a year
  3. everything needs to be completely rewritten
symfony/symfony                               2.6.x-dev 7224bde  The Symfony PHP framework
symfony2admingenerator/form-bundle            v1.1.0             Twig extension introduceing new blocks to seperate form HTML structure from CSS decorating it and JS enhancing it's functionalities.
symfony2admingenerator/form-extensions-bundle dev-master 5753681 Add additional form types to symfony2
symfony2admingenerator/generator-bundle       dev-master 99abcd6 Admingenerator for Symfony2 based on YAML configuration and Twig templating
symfony2admingenerator/twig-generator         v1.1.4             A generator for PHP code based on Twig template engine
symfony2admingenerator/user-bundle            dev-master 59c6b84 FOSUserBundle integration for Symfony2Admingenerator.

@bobvandevijver
Copy link
Member

That is an old project indeed!

This is our installation with Symfony 6.4, which is actually a project that started with Symfony 2 as well.

symfony2admingenerator/form-bundle            2.0.0    Twig extension introducing new blocks to seperate form HTML structure from CSS decorat...
symfony2admingenerator/form-extensions-bundle 4.0.1    Add additional form types to symfony2
symfony2admingenerator/generator-bundle       5.0.3    Admingenerator for Symfony based on YAML configuration and Twig templating
symfony2admingenerator/twig-generator         2.0.2    A generator for PHP code based on Twig template engine

No user-bundle though, no clue what the state of that one is...

Can't it be specified in the routing.yml file the good old fashioned way, like it used to be?

Yes, that would still work. We have switched to php-only configuration, which made the generator crash due to not finding the routing.yml file, but there might have also been a incompatibility with a vendor used to place it there. In any case, we choose the remove the automated injection: I believe the command also instruct to place the routing somewhere.

@ksn135
Copy link
Contributor Author

ksn135 commented Jun 3, 2024

The AgrosupDijon-DSI/BreadcrumbBundle (cnerta/breadcrumb-bundle) is not maintained and outdated.

Another thing we do not use at all :)

NOT solved yet. WIP.

Maybe it'll help someone. I'll leave it here.

Add to your composer.json:

    "repositories": [
        {
          "type": "vcs",
          "url": "https://github.com/ksn135/BreadcrumbBundle"
        }
     ],  

And run

composer req  "cnerta/breadcrumb-bundle":"v1.0.0.x-dev"

@suntong
Copy link

suntong commented Jul 24, 2024

Oh, hmmm... Where does it, pardon me, needs to be inserted? )

Need to know that too, what's the answer please?

@bobvandevijver
Copy link
Member

Need to know that too, what's the answer please?

As stated, you will need to add it to one of your routing definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants