Comments (8)
@LogicSatinn Yeah I agree that it could probably make testing a bit easier for anyone using the package. I think I'd class it more as a "nice-to-have" though rather than "absolutely necessary" haha! 😄
I've put a tweet to get other dev's opinions on whether they'd expect a package to provide factories, or whether you should implement them yourselves. I'll wait until I've got a bit more feedback before I go ahead with making any changes. So I'll probably come back to this in a few days.
But if we end up going forward with it, I'd be cool for you to PR the changes 🙂
Absolutely 🔥... I'll keep my eyes out on the response and hear what other devs might say about that.
from short-url.
@LogicSatinn Yeah, I agree, it looks like this is something that some people might like. I'm cool with you to make a PR if you'd like? 🙂
Sure thing @ash-jc-allen. But I'm a bit occupied for the day. I'll start working on that tomorrow.
from short-url.
This feature has now been released as part of v7.3.0 (https://github.com/ash-jc-allen/short-url/releases/tag/v7.3.0) 🙂
from short-url.
Hey @LogicSatinn! This is something that I've thought about myself in the past. I'm not sure what the standard approach to this would usually be.
On the one hand, as you'll already know, it only takes a couple of minutes to extend the models and add the factories.
But, on the other hand, it means that if you're using this approach it might break things like polymorphic relationships in the database. Because you'd be storing App\Models\ShortURL
rather than AshAllenDesign\ShortURL\Models\ShortURL
.
So I'm pretty open to any suggestions on this one. My main aim for this package is to try and keep it pain-free and easy to use, so I'm happy to take direction from devs (such as yourself) that are using this in their own projects 😄
Do you think that having model factories provided by the package would make things easier?
from short-url.
@ash-jc-allen It is absolutely necessary if somebody needs to have some tests, and of course, painlessly easy-to-use.
On the other hand, it's also a choice to have some tests while using the package or not.
My point is, we could make things better by providing this feature and also making it a choice. I have already looked into how we could make that happen.
from short-url.
@LogicSatinn Yeah I agree that it could probably make testing a bit easier for anyone using the package. I think I'd class it more as a "nice-to-have" though rather than "absolutely necessary" haha! 😄
I've put a tweet to get other dev's opinions on whether they'd expect a package to provide factories, or whether you should implement them yourselves. I'll wait until I've got a bit more feedback before I go ahead with making any changes. So I'll probably come back to this in a few days.
But if we end up going forward with it, I'd be cool for you to PR the changes 🙂
from short-url.
@ash-jc-allen Hey Buddy. So, turns out Model Factories is an appreciated feature among the devs. Would you like a PR on this or would you like to do this yourself?
from short-url.
@LogicSatinn Yeah, I agree, it looks like this is something that some people might like. I'm cool with you to make a PR if you'd like? 🙂
from short-url.
Related Issues (20)
- Collision and performance issue HOT 7
- Should store the country and city HOT 1
- redirect to url instead of throwing 404 HOT 3
- Laravel Sail Conflict Wrong IP HOT 1
- outdated v2.7 mobiledetect/mobiledetectlib in jenssegers/agent HOT 3
- Error: Class 'AshAllenDesign\ShortURL\Classes\Builder' not found HOT 1
- Prefix Null Issue HOT 10
- Laravel Jetstream compatability issue due to jenssegers/agent outdated dependency HOT 8
- db migration issue
- 如何获取真实的IP? HOT 3
- Tenancy with multi databases HOT 3
- remove prefix don't work HOT 2
- Specify the amount of uses HOT 1
- Browser information being stored as `0` (`false`) when not available in headers HOT 1
- Compatibility issue with Laravel 11 HOT 2
- [Discuss] Dropping `default_short_url` column in favor of `Accessor`
- any way to have multiple short base urls? HOT 2
- Upgrading to Laravel 11 HOT 3
- Laravel 11 compatibility HOT 2
- BindingResolutionException when trying to use lib HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from short-url.