mirror of
https://github.com/JLiscom/OpenNote.git
synced 2026-04-26 00:35:48 +03:00
[PR #18] [CLOSED] Initial upgrade using composer, phpunit and many SOLID concepts #180
Labels
No labels
bug
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OpenNote-JLiscom#180
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/JLiscom/OpenNote/pull/18
Author: @crazycodr
Created: 11/7/2013
Status: ❌ Closed
Base:
master← Head:master📝 Commits (4)
0f8d37aInstalled composer, phpunit and travis-ci core filesf2cc146Added composer installation stepsac6a96eRemoved personnal sublime test SFTP config file that is useless to othersfb9a08aFixed incorrect .gitignore file📊 Changes
18 files changed (+1338 additions, -35 deletions)
View changed files
➕
.gitignore(+1 -0)➕
.travis.yml(+12 -0)📝
OpenNote/modules/core/Common.php(+30 -5)📝
OpenNote/modules/login/Authenticater.php(+65 -29)📝
README.md(+13 -1)➕
composer.json(+16 -0)➕
composer.lock(+537 -0)➕
phpunit.php(+28 -0)➕
phpunit.xml(+18 -0)➕
system/OpenNote/Data/Builders/UserBuilder.php(+77 -0)➕
system/OpenNote/Data/Factories/UserFactory.php(+19 -0)➕
system/OpenNote/Data/Models/User.php(+176 -0)➕
system/OpenNote/Data/Providers/GlobalCoreProxyProvider.php(+33 -0)➕
system/OpenNote/Data/Repositories/UserRepository.php(+191 -0)➕
test.php(+15 -0)➕
tests/OpenNote/Data/Builders/UserBuilderTest.php(+34 -0)➕
tests/OpenNote/Data/Factories/UserFactoryTest.php(+16 -0)➕
tests/OpenNote/Data/Models/UserTest.php(+57 -0)📄 Description
Hey there,
I really like your project and the reason i'm suggesting this pull request here is i see you have potential, mostly around front-end and your project is really inspiring me! But, sadly, your backend is messy... You might consider it non-cluttered but it is actually very messy and cluttered.
This pull request is a simple and working upgrade to your current system. It favors SOLID principles by creating many small objects such as Models, Factories, Repositories, Builders, etc. You might find it "cluttery" but it is a good base for a solid foundation for your software.
To aleviate the changes, i installed a much required composer.json file, it will allow you to get many dependencies into the software and not have to recode what other people have already done. In the dependencies, i have installed the popular Laravel Illuminate Container component, it allows easy inversion of control.
I also have changed your Authenticator class to use my User package in general, take a look at it for more information on what i did. At first glance, it doesn't seem like i did much work but it's a highly recommended rework before you get too far into your software.
Finaly, i have also created some unit tests, but there is still a lot of work to do on that part because my objects are still not the best since i didn't use a tried and tested query builder. Therefore, the Repositories are not tested adequately and the Authenticator class does too much and violates the SRP principles.
If you accept this pull request, i will rework many other aspects in smaller increments, this is a big push, shouldn't break your actual software. If you refuse it, fine by me, i'll have lost 8h of my time but i loved every minute of it!
Good luck, i hope you'll accept this PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.