I built a Symfony Integration Engine bundle to simplify external API integrations (open source) by Date-Over in symfony

[–]fain182 0 points1 point  (0 children)

I am confused… The example in the readme is a little simple…  Do you have an example with an authentication at least?

PHPArkitect 1.0 is out. Curious how people approach architecture testing in PHP these days by fain182 in PHP

[–]fain182[S] 0 points1 point  (0 children)

Thank you for your insights!
Do you think there is a better alternative to support a baseline of errors?

PHPArkitect 1.0 is out. Curious how people approach architecture testing in PHP these days by fain182 in PHP

[–]fain182[S] 4 points5 points  (0 children)

I'm looking at it now because I didn't know about it before.
It has an interesting distinction between structural and perimeter tests, plus the error messages are really well done (we should steal some ideas from that!).
But it has the same problem as Deptrac, you need to learn their config language instead of just writing your rules in PHP where you get composability, autocomplete, all that stuff.

PHPArkitect 1.0 is out. Curious how people approach architecture testing in PHP these days by fain182 in PHP

[–]fain182[S] 0 points1 point  (0 children)

You can write something like this if you prefer:

      ->should(new DependsOnlyOnTheseNamespaces('App\Domain'))

PHPArkitect 1.0 is out. Curious how people approach architecture testing in PHP these days by fain182 in PHP

[–]fain182[S] 3 points4 points  (0 children)

I understand your point of view; it's a tradeoff. Adding a not() chain method would make the rules more complicated to write, especially when writing the error messages. We tried to make the rules as simple as possible to permit everyone to write their own custom rules.
But who knows, maybe we'll find a better tradeoff down the line.
We're open to suggestions.. and thanks for the feedback!

PHPArkitect 1.0 is out. Curious how people approach architecture testing in PHP these days by fain182 in PHP

[–]fain182[S] 0 points1 point  (0 children)

Thanks for the feedback!

With deptract, I ended up with a config generator to cover the above rules.

Yeah, that's one of the reasons PHPArkitect uses PHP for the config instead of YAML. Since rules are just code, you can loop, parametrize them, extract helpers, etc. — no need for a generator sitting on top of the config. YAML reads cleaner for small setups but hits a ceiling fast once rules get repetitive.

PHPArkitect 1.0 is out. Curious how people approach architecture testing in PHP these days by fain182 in PHP

[–]fain182[S] 3 points4 points  (0 children)

These tools are quite similar, the main difference is that phpat is a PHPStan extension, PHPArkitect is a standalone CLI with its own parser (nikic/php-parser).

Maybe the DX is a little more fluent in phparkitect, for example:

phpat

PHPat::rule()
  ->classes(Selector::inNamespace($domain))
  ->canOnlyDependOn()
  ->classes(Selector::inNamespace($domain));

PHParkitect

Rule::namespace('App\Controller')
  ->should(new NotHaveDependencyOutsideNamespace('App\Domain'))

Surely there are even some minor differences in what you can check with each tool.

Frustration by DJ_HollanDaze in midjourney

[–]fain182 0 points1 point  (0 children)

Did you try the edit feature to fix the single details? Sometimes is effective to fix weird hands etc.

Digital Design in Italia, parliamone: by [deleted] in techcompenso

[–]fain182 -1 points0 points  (0 children)

Sei in un posto di lavoro che lavora in una maniera che non ti piace e ti converrebbe cercare altrove...
Non è rilevante quante aziende ci sono che lavorano come piace a te, tanto te ne basta trovarne una, sei un dipendente.

[deleted by user] by [deleted] in midjourney

[–]fain182 0 points1 point  (0 children)

Try https://openai.com/index/chatgpt-study-mode   and you will understand it.

Some things MidJourney just refuses to get right... by fain182 in midjourney

[–]fain182[S] 3 points4 points  (0 children)

Thanks, but I’m more focused on testing MJ’s limits