Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial library iteration #3

Merged
merged 41 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7c25829
Added logging classes, Sentry adapter and dummy test
Meldiron Nov 9, 2021
a02e3f5
Fixed tests
Meldiron Nov 10, 2021
74a1b3b
Moved classes for beter namespacing, new authors,
Meldiron Nov 10, 2021
0c8adfd
Fix after refactoring
Meldiron Nov 10, 2021
78d66b3
Removed cache
Meldiron Nov 10, 2021
8b82fc6
Ignore cache
Meldiron Nov 10, 2021
39f47f5
Added AppSigal implementation, added timestamp of when issue occured
Meldiron Nov 10, 2021
afc622e
Removed unnecessary code
Meldiron Nov 10, 2021
343e2d0
Added raygun adapter
Meldiron Nov 10, 2021
91a7112
Apply suggestions from code review
Meldiron Nov 11, 2021
57ed9d7
Code review changes
Meldiron Nov 11, 2021
52cd8ce
Added example code into readme
Meldiron Nov 14, 2021
3714e1c
Review refactoring, improved tests, used CONST for type parameters
Meldiron Nov 16, 2021
7cf2dfd
Refactor types, Test fix, added fail tests, added adapter tutorial
Meldiron Nov 16, 2021
1bbc5c8
Review changes
Meldiron Nov 22, 2021
67ccde7
added provider registry
Meldiron Nov 22, 2021
0d3f8c4
Fixed adapter name
Meldiron Nov 22, 2021
6bf9f21
Improved constructor structure
Meldiron Nov 22, 2021
585fbfc
Made methods static, as ti should be
Meldiron Nov 22, 2021
b287bcf
Fixed adapters registration
Meldiron Nov 23, 2021
2cc7e56
Bug fix
Meldiron Nov 23, 2021
43cc77b
Fixed get errors on unfilled fields when pushing
Meldiron Nov 23, 2021
6dadc53
Fixed type errors
Meldiron Nov 23, 2021
11f94f7
Bug fix
Meldiron Nov 23, 2021
727b510
Code analysis fix
Meldiron Nov 23, 2021
26f7213
Fixed tests
Meldiron Nov 23, 2021
5d8cc1b
Paused exteral tests, replaced "set" functions with "add" on array at…
Meldiron Nov 24, 2021
572ada8
Pr review changes
Meldiron Nov 29, 2021
00981cc
Merge branch 'main' into dev
Meldiron Nov 29, 2021
5412165
Tests fix
Meldiron Nov 29, 2021
59b1f47
Merge branch 'dev' of https://github.com/utopia-php/logger into dev
Meldiron Nov 29, 2021
e135df7
Tests fix
Meldiron Nov 29, 2021
c50b16a
Added missing type
Meldiron Nov 29, 2021
74140bf
Abstracted validate logic into Adapter class + updated docs
Meldiron Dec 5, 2021
db66b8c
Updated required PHP from 7 to 8
Meldiron Dec 5, 2021
aad8991
PR build fix
Meldiron Dec 6, 2021
e67eafc
Removed PHP 8.1
Meldiron Dec 6, 2021
07c7afd
Follow PHP Fig standards
Meldiron Dec 14, 2021
5a6c39c
Update README.md
Meldiron Dec 19, 2021
48b35b1
Review changes
Meldiron Dec 19, 2021
973fcef
Merge branch 'dev' of https://github.com/utopia-php/logger into dev
Meldiron Dec 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: "🐛 Bug Report"
description: "Submit a bug report to help us improve"
title: "🐛 Bug Report: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out our bug report form 🙏
- type: textarea
id: steps-to-reproduce
validations:
required: true
attributes:
label: "👟 Reproduction steps"
description: "How do you trigger this bug? Please walk us through it step by step."
placeholder: "When I ..."
- type: textarea
id: expected-behavior
validations:
required: true
attributes:
label: "👍 Expected behavior"
description: "What did you think would happen?"
placeholder: "It should ..."
- type: textarea
id: actual-behavior
validations:
required: true
attributes:
label: "👎 Actual Behavior"
description: "What did actually happen? Add screenshots, if applicable."
placeholder: "It actually ..."
- type: dropdown
id: Utopia-Logging-version
attributes:
label: "🎲 Utopia Logging version"
description: "What version of the library are you running?"
options:
- Version 0.1.x
- Different version (specify in environment)
validations:
required: true
- type: dropdown
id: operating-system
attributes:
label: "💻 Operating system"
description: "What OS is your server / device running on?"
options:
- Linux
- MacOS
- Windows
- Something else
validations:
required: true
- type: dropdown
id: php-version
attributes:
label: "🐘 PHP Version"
description: "What version of PHP are you running?"
options:
- PHP 7.3.x
- PHP 7.4.x
- Different version (specify in environment)
validations:
required: true
- type: textarea
id: environment
validations:
required: false
attributes:
label: "🧱 Your Environment"
description: "Is your environment customized in any way?"
placeholder: "I use Cloudflare for ..."
- type: checkboxes
id: no-duplicate-issues
attributes:
label: "👀 Have you spent some time to check if this issue has been raised before?"
description: "Have you Googled for a similar issue or checked our older issues for a similar bug?"
options:
- label: "I checked and didn't find similar issue"
required: true
- type: checkboxes
id: read-code-of-conduct
attributes:
label: "🏢 Have you read the Code of Conduct?"
options:
- label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)"
required: true
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "📚 Documentation"
description: "Report an issue related to documentation"
title: "📚 Documentation: "
labels: [documentation]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to make our documentation better 🙏
- type: textarea
id: issue-description
validations:
required: true
attributes:
label: "💭 Description"
description: "A clear and concise description of what the issue is."
placeholder: "Documentation should not ..."
- type: checkboxes
id: no-duplicate-issues
attributes:
label: "👀 Have you spent some time to check if this issue has been raised before?"
description: "Have you Googled for a similar issue or checked our older issues for a similar bug?"
options:
- label: "I checked and didn't find similar issue"
required: true
- type: checkboxes
id: read-code-of-conduct
attributes:
label: "🏢 Have you read the Code of Conduct?"
options:
- label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)"
required: true
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 🚀 Feature
description: "Submit a proposal for a new feature"
title: "🚀 Feature: "
labels: [feature]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out our feature request form 🙏
- type: textarea
id: feature-description
validations:
required: true
attributes:
label: "🔖 Feature description"
description: "A clear and concise description of what the feature is."
placeholder: "You should add ..."
- type: textarea
id: pitch
validations:
required: true
attributes:
label: "🎤 Pitch"
description: "Please explain why this feature should be implemented and how it would be used. Add examples, if applicable."
placeholder: "In my use-case, ..."
- type: checkboxes
id: no-duplicate-issues
attributes:
label: "👀 Have you spent some time to check if this issue has been raised before?"
description: "Have you Googled for a similar issue or checked our older issues for a similar bug?"
options:
- label: "I checked and didn't find similar issue"
required: true
- type: checkboxes
id: read-code-of-conduct
attributes:
label: "🏢 Have you read the Code of Conduct?"
options:
- label: "I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)"
required: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
composer.lock
/vendor/
/.idea/
.env
.phpunit.result.cache
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: php

php:
- 7.4
- 8.0
- nightly
Meldiron marked this conversation as resolved.
Show resolved Hide resolved

notifications:
email:
- [email protected]

before_script: composer install --ignore-platform-reqs

script:
- vendor/bin/phpunit --configuration phpunit.xml
- vendor/bin/psalm --show-info=true
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity, expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
101 changes: 101 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Contributing

We would ❤️ for you to contribute to Utopia-php and help make it better! We want contributing to Utopia-php to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, new docs as well as updates and tweaks, blog posts, workshops, and more.

## How to Start?

If you are worried or don’t know where to start, check out our next section explaining what kind of help we could use and where can you get involved. You can reach out with questions to [Eldad Fux (@eldadfux)](https://twitter.com/eldadfux) or anyone from the [Appwrite team on Discord](https://discord.gg/GSeTUeA). You can also submit an issue, and a maintainer can guide you!

## Code of Conduct

Help us keep Utopia-php open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).

## Submit a Pull Request 🚀

Branch naming convention is as following

`TYPE-ISSUE_ID-DESCRIPTION`

example:

```
doc-548-submit-a-pull-request-section-to-contribution-guide
```

When `TYPE` can be:

- **feat** - is a new feature
- **doc** - documentation only changes
- **cicd** - changes related to CI/CD system
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature

**All PRs must include a commit message with the changes description!**

For the initial start, fork the project and use git clone command to download the repository to your computer. A standard procedure for working on an issue would be to:

1. `git pull`, before creating a new branch, pull the changes from upstream. Your master needs to be up to date.

```
$ git pull
```

2. Create new branch from `master` like: `doc-548-submit-a-pull-request-section-to-contribution-guide`<br/>

```
$ git checkout -b [name_of_your_new_branch]
```

3. Work - commit - repeat ( be sure to be in your branch )

4. Push changes to GitHub

```
$ git push origin [name_of_your_new_branch]
```

5. Submit your changes for review
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
6. Start a Pull Request
Now submit the pull request and click on `Create pull request`.
7. Get a code review approval/reject
8. After approval, merge your PR
9. GitHub will automatically delete the branch after the merge is done. (they can still be restored).

## Introducing New Features

We would 💖 you to contribute to Utopia-php, but we would also like to make sure Utopia-php is as great as possible and loyal to its vision and mission statement 🙏.

For us to find the right balance, please open an issue explaining your ideas before introducing a new pull request.

This will allow the Utopia-php community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.

This is also important for the Utopia-php lead developers to be able to give technical input and different emphasis regarding the feature design and architecture. Some bigger features might need to go through our [RFC process](https://github.com/appwrite/rfc).

## Other Ways to Help

Pull requests are great, but there are many other areas where you can help Utopia-php.

### Blogging & Speaking

Blogging, speaking about, or creating tutorials about one of Utopia-php’s many features is great way to contribute and help our project grow.

### Presenting at Meetups

Presenting at meetups and conferences about your Utopia-php projects. Your unique challenges and successes in building things with Utopia-php can provide great speaking material. We’d love to review your talk abstract/CFP, so get in touch with us if you’d like some help!

### Sending Feedbacks & Reporting Bugs

Sending feedback is a great way for us to understand your different use cases of Utopia-php better. If you had any issues, bugs, or want to share about your experience, feel free to do so on our GitHub issues page or at our [Discord channel](https://discord.gg/GSeTUeA).

### Submitting New Ideas

If you think Utopia-php could use a new feature, please open an issue on our GitHub repository, stating as much information as you can think about your new idea and it's implications. We would also use this issue to gather more information, get more feedback from the community, and have a proper discussion about the new feature.

### Improving Documentation

Submitting documentation updates, enhancements, designs, or bug fixes. Spelling or grammar fixes will be very much appreciated.

### Helping Someone

Searching for Utopia-php, GitHub or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to Utopia-php's repo!
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Meldiron marked this conversation as resolved.
Show resolved Hide resolved
Copyright (c) 2021 utopia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading