[PR #18] [CLOSED] Initial upgrade using composer, phpunit and many SOLID concepts #180

Closed
opened 2026-02-26 01:35:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JLiscom/OpenNote/pull/18
Author: @crazycodr
Created: 11/7/2013
Status: Closed

Base: masterHead: master


📝 Commits (4)

  • 0f8d37a Installed composer, phpunit and travis-ci core files
  • f2cc146 Added composer installation steps
  • ac6a96e Removed personnal sublime test SFTP config file that is useless to others
  • fb9a08a Fixed 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.

## 📋 Pull Request Information **Original PR:** https://github.com/JLiscom/OpenNote/pull/18 **Author:** [@crazycodr](https://github.com/crazycodr) **Created:** 11/7/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`0f8d37a`](https://github.com/JLiscom/OpenNote/commit/0f8d37acde6ad1de9946dc86abfee67594d75797) Installed composer, phpunit and travis-ci core files - [`f2cc146`](https://github.com/JLiscom/OpenNote/commit/f2cc1464358b76bad5b7ca7dabdc7000fdf12e5d) Added composer installation steps - [`ac6a96e`](https://github.com/JLiscom/OpenNote/commit/ac6a96e1fe373f0398d037dda6d29b0857ef0034) Removed personnal sublime test SFTP config file that is useless to others - [`fb9a08a`](https://github.com/JLiscom/OpenNote/commit/fb9a08a662e77bba379444f65a7b4edf5f44320a) Fixed incorrect .gitignore file ### 📊 Changes **18 files changed** (+1338 additions, -35 deletions) <details> <summary>View changed files</summary> ➕ `.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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 01:35:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OpenNote-JLiscom#180
No description provided.