Sigh, why weren't capsules kept for version 3, as it's a HUGE breaking change!?! #1644
Replies: 8 comments 13 replies
-
What are you even talking about? Modules are not going anywhere. |
Beta Was this translation helpful? Give feedback.
-
Nobody said anywhere that capsules are the way to build Twill modules. Look a little bit further before ranting like this... |
Beta Was this translation helpful? Give feedback.
-
Capsules are simply a way to structure a Twill module. You don't have to use it if you don't like it, like, ever, and we are not pushing people to use it either. As you said yourself, it's not even properly documented. The docs are still talking about modules all over the place and that's not changing. We refactored capsules so they could be autoloaded from our new package feature, that's it.
You're overreacting so much that your title doesn't even match what you are complaining about... |
Beta Was this translation helpful? Give feedback.
-
Hi @kirkbushell, this was an odd read... I have a good appreciation for your previous comments and thoughts on how to improve the project. In fact, some of your previous comments have been the seed to work on better support for composer packages, moving away from array configuration to more OO ways of extending and composing entities, etc. A lot of that effort is now led by @haringsrob, who's hard at work on refactoring and testing. The road ahead is long but we indeed have left the station. It sounds like Twill is simply not what you are looking for in the end. Maybe Twill's take on solving the "CMS" problem is just not the right level of abstraction for you, and that's ok. |
Beta Was this translation helpful? Give feedback.
-
Here are some details regarding the issues. This was right after upgrade to latest:
Stack trace: /Users/kirkbushell/Work/Mine/rathetimes/vendor/area17/twill/src/TwillCapsules.php:70 TwillCapsules.php: public function getCapsuleForModel(string $model): Capsule
{
$capsule = $this->getRegisteredCapsules()->first(function (Capsule $capsule) use ($model) {
return $capsule->getSingular() === $model;
});
if (! $capsule) {
throw new NoCapsuleFoundException($model);
}
return $capsule;
} This happened while trying to utilise HasSlug at version: 2.8.2 Now admittedly I wrote this when I was pissed off and should have taken the night, but even so - this isn't the first time it's happened, that's why I started it as a discussion piece. The claims that capsules aren't required appears to be completely false on at -least- this version, perhaps earlier. |
Beta Was this translation helpful? Give feedback.
-
Let me add as I've added it as comments earlier: I apologise for my hasty comment. I wasn't in a good mood after the upgrade and certainly should have cooled down first before posting - I'm sorry I reacted in such a way. |
Beta Was this translation helpful? Give feedback.
-
Hey @kirkbushell, Trying to reproduce the issue. Could you check the existence of:
Also please make sure that the namespace and filenames are correct inside the files. The error you experience should only show up if the Since you are upgrading from an older version of twill, it might have to do with the You could also add in public function getSlugModelClass()
{
$slug = $this->getNamespace() . "\Slugs\\" . $this->getSlugClassName();
dd($slug); // ADD THIS LINE FOR DEBUGGING.
if (@class_exists($slug)) {
return $slug;
}
return TwillCapsules::getCapsuleForModel(class_basename($this))->getSlugModel();
} Thanks |
Beta Was this translation helpful? Give feedback.
-
There was another case which provided more information on the issue, mostly it was related to models being in nested folders so: app/models/somefolder/model instead of /app/models/model This pr fixes this #1738 (at the time of writing not merged). |
Beta Was this translation helpful? Give feedback.
-
I'm trying to migrate my twill cms installation to the latest, moving away from modules to capsules, and the amount of work to get this going (because there's no documentation, and some configuration doesn't seem to have any effect)... It's just another reason why I get so damn frustrated with this CMS.
I understand you guys are busy, I understand this is developed for your clients and so first used in-house, but you guys need to develop a better approach to releasing software.
Capsules were never a great idea, I put forth my arguments numerous times on this, and the amount of work required to enforce an opinionated structure is just ludicrous. The amount of configuration for this software is just... it boggles the damn mind.
This isn't the Laravel way. If anything, it's the antithesis of the Laravel methodology to development.
Obviously I'm frustrated. Twill CMS has some very nice features, but this approach to features I am very positive longterm will see me migrate to other systems instead. It's just too frustrating.
Beta Was this translation helpful? Give feedback.
All reactions