diff --git a/.env.example b/.env.example index 2bfaddd1..d3e03c26 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,9 @@ -APP_NAME=Laravel +APP_NAME=solidtime APP_ENV=local APP_KEY=base64:UNQNf1SXeASNkWux01Rj8EnHYx8FO0kAxWNDwktclkk= APP_DEBUG=true -APP_URL=http://localhost +APP_URL=https://solidtime.test +APP_FORCE_HTTPS=true SUPER_ADMINS=admin@example.com @@ -60,6 +61,6 @@ VITE_PUSHER_PORT="${PUSHER_PORT}" VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" -NGINX_HOST_NAME=timetracker.test +NGINX_HOST_NAME=solidtime.test NETWORK_NAME=reverse-proxy-docker-traefik_routing diff --git a/LICENSE.txt b/LICENSE.md similarity index 73% rename from LICENSE.txt rename to LICENSE.md index 1401d0e2..37df9f98 100644 --- a/LICENSE.txt +++ b/LICENSE.md @@ -1,11 +1,13 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 +GNU Affero General Public License +================================= + +_Version 3, 19 November 2007_ +_Copyright © 2007 Free Software Foundation, Inc. <>_ -Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble +## Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure @@ -25,7 +27,7 @@ want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer +with two steps: **(1)** assert copyright on the software, and **(2)** offer you this License which gives you legal permission to copy, distribute and/or modify the software. @@ -56,70 +58,70 @@ this license. The precise terms and conditions for copying, distribution and modification follow. - TERMS AND CONDITIONS +## TERMS AND CONDITIONS -0. Definitions. +### 0. Definitions -"This License" refers to version 3 of the GNU Affero General Public License. +“This License” refers to version 3 of the GNU Affero General Public License. -"Copyright" also means copyright-like laws that apply to other kinds of +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. -"The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. -To "modify" a work means to copy from or adapt all or part of the work +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. +exact copy. The resulting work is called a “modified version” of the +earlier work or a work “based on” the earlier work. -A "covered work" means either the unmodified Program or a work based +A “covered work” means either the unmodified Program or a work based on the Program. -To "propagate" a work means to do anything with it that, without +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. -To "convey" a work means any kind of propagation that enables other +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. -An interactive user interface displays "Appropriate Legal Notices" +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) +feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. -1. Source Code. +### 1. Source Code -The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source +The “source code” for a work means the preferred form of the work +for making modifications to it. “Object code” means any non-source form of a work. -A "Standard Interface" means an interface that either is an official +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. -The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of +The “System Libraries” of an executable work include anything, other +than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that +Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component +“Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. -The "Corresponding Source" for a work in object code form means all +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's @@ -139,7 +141,7 @@ Source. The Corresponding Source for a work in source code form is that same work. -2. Basic Permissions. +### 2. Basic Permissions All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated @@ -164,7 +166,7 @@ Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. -3. Protecting Users' Legal Rights From Anti-Circumvention Law. +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article @@ -180,7 +182,7 @@ modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. -4. Conveying Verbatim Copies. +### 4. Conveying Verbatim Copies You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and @@ -193,101 +195,94 @@ recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. -5. Conveying Modified Source Versions. +### 5. Conveying Modified Source Versions You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. +* **a)** The work must carry prominent notices stating that you modified +it, and giving a relevant date. +* **b)** The work must carry prominent notices stating that it is +released under this License and any conditions added under section 7. +This requirement modifies the requirement in section 4 to +“keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this +License to anyone who comes into possession of a copy. This +License will therefore apply, along with any applicable section 7 +additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no +permission to license the work in any other way, but it does not +invalidate such permission if you have separately received it. +* **d)** If the work has interactive user interfaces, each must display +Appropriate Legal Notices; however, if the Program has interactive +interfaces that do not display Appropriate Legal Notices, your +work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not +“aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. -6. Conveying Non-Source Forms. +### 6. Conveying Non-Source Forms You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. +* **a)** Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by the +Corresponding Source fixed on a durable physical medium +customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by a +written offer, valid for at least three years and valid for as +long as you offer spare parts or customer support for that product +model, to give anyone who possesses the object code either **(1)** a +copy of the Corresponding Source for all the software in the +product that is covered by this License, on a durable physical +medium customarily used for software interchange, for a price no +more than your reasonable cost of physically performing this +conveying of source, or **(2)** access to copy the +Corresponding Source from a network server at no charge. +* **c)** Convey individual copies of the object code with a copy of the +written offer to provide the Corresponding Source. This +alternative is allowed only occasionally and noncommercially, and +only if you received the object code with such an offer, in accord +with subsection 6b. +* **d)** Convey the object code by offering access from a designated +place (gratis or for a charge), and offer equivalent access to the +Corresponding Source in the same way through the same place at no +further charge. You need not require recipients to copy the +Corresponding Source along with the object code. If the place to +copy the object code is a network server, the Corresponding Source +may be on a different server (operated by you or a third party) +that supports equivalent copying facilities, provided you maintain +clear directions next to the object code saying where to find the +Corresponding Source. Regardless of what server hosts the +Corresponding Source, you remain obligated to ensure that it is +available for as long as needed to satisfy these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided +you inform other peers where the object code and Corresponding +Source of the work are being offered to the general public at no +charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. -A "User Product" is either (1) a "consumer product", which means any +A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation +or household purposes, or **(2)** anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a +product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product @@ -295,7 +290,7 @@ is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. -"Installation Information" for a User Product means any methods, +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must @@ -328,9 +323,9 @@ documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. -7. Additional Terms. +### 7. Additional Terms -"Additional permissions" are terms that supplement the terms of this +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent @@ -350,31 +345,26 @@ Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - -All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you +* **a)** Disclaiming warranty or limiting liability differently from the +terms of sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or +author attributions in that material or in the Appropriate Legal +Notices displayed by works containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or +requiring that modified versions of such material be marked in +reasonable ways as different from the original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or +authors of the material; or +* **e)** Declining to grant rights under trademark law for use of some +trade names, trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that +material by anyone who conveys the material (or modified versions of +it) with contractual assumptions of liability to the recipient, for +any liability that these contractual assumptions directly impose on +those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains @@ -392,7 +382,7 @@ Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. -8. Termination. +### 8. Termination You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or @@ -401,9 +391,9 @@ this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) +license from a particular copyright holder is reinstated **(a)** provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright +finally terminates your license, and **(b)** permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. @@ -420,7 +410,7 @@ this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. -9. Acceptance Not Required for Having Copies. +### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work @@ -431,14 +421,14 @@ modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. -10. Automatic Licensing of Downstream Recipients. +### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. -An "entity transaction" is a transaction transferring control of an +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that @@ -456,19 +446,19 @@ rights granted under this License, and you may not initiate litigation any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. -11. Patents. +### 11. Patents -A "contributor" is a copyright holder who authorizes use under this +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". +work thus licensed is called the contributor's “contributor version”. -A contributor's "essential patent claims" are all patent claims +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant +purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. @@ -477,10 +467,10 @@ patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. -In the following three paragraphs, a "patent license" is any express +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a +sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. @@ -488,11 +478,11 @@ If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner +then you must either **(1)** cause the Corresponding Source to be so +available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have +license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that @@ -506,7 +496,7 @@ or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. -A patent license is "discriminatory" if it does not include within +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered @@ -515,8 +505,8 @@ in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily +patent license **(a)** in connection with copies of the covered work +conveyed by you (or copies made from those copies), or **(b)** primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. @@ -525,7 +515,7 @@ Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. -12. No Surrender of Others' Freedom. +### 12. No Surrender of Others' Freedom If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not @@ -537,7 +527,7 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. -13. Remote Network Interaction; Use with the GNU General Public License. +### 13. Remote Network Interaction; Use with the GNU General Public License Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users @@ -558,7 +548,7 @@ License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. -14. Revised Versions of this License. +### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions @@ -567,7 +557,7 @@ address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the +Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the @@ -584,18 +574,18 @@ permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. -15. Disclaimer of Warranty. +### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -16. Limitation of Liability. +### 16. Limitation of Liability IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS @@ -607,7 +597,7 @@ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -17. Interpretation of Sections 15 and 16. +### 17. Interpretation of Sections 15 and 16 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, @@ -616,9 +606,9 @@ an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - END OF TERMS AND CONDITIONS +_END OF TERMS AND CONDITIONS_ - How to Apply These Terms to Your New Programs +## How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -627,11 +617,10 @@ free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. +the “copyright” line and a pointer to where the full notice is found. - - Copyright (C) 2024 Gregor Vostrak & Constantin Graf + Copyright (C) 2024 Gregor Vostrak & Constantin Graf This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -651,12 +640,12 @@ Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive +interface could display a “Source” link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. +if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see -. +<>. diff --git a/README.md b/README.md index 81b9fa60..eb0c4796 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ Additional System Requirements: Add the following entry to your `/etc/hosts` ``` -127.0.0.1 timetracker.test -127.0.0.1 playwright.timetracker.test +127.0.0.1 solidtime.test +127.0.0.1 playwright.solidtime.test ``` ## Running E2E Tests -`./vendor/bin/sail up -d ` will automatically start a Playwright UI server that you can access at `https://playwright.timetracker.test`. +`./vendor/bin/sail up -d ` will automatically start a Playwright UI server that you can access at `https://playwright.solidtime.test`. Make sure that you use HTTPS otherwise the resources will not be loaded correctly. ## Recording E2E Tests @@ -49,7 +49,7 @@ To record E2E tests, you need to install and execute playwright locally (outside ```bash npx playwright install -npx playwright codegen timetracker.test +npx playwright codegen solidtime.test ``` ## Contributing diff --git a/app/Actions/Fortify/PasswordValidationRules.php b/app/Actions/Fortify/PasswordValidationRules.php index cb9c21f9..913188bf 100644 --- a/app/Actions/Fortify/PasswordValidationRules.php +++ b/app/Actions/Fortify/PasswordValidationRules.php @@ -4,6 +4,7 @@ namespace App\Actions\Fortify; +use Illuminate\Contracts\Validation\Rule; use Illuminate\Validation\Rules\Password; trait PasswordValidationRules @@ -11,7 +12,7 @@ trait PasswordValidationRules /** * Get the validation rules used to validate passwords. * - * @return array + * @return array */ protected function passwordRules(): array { diff --git a/app/Actions/Jetstream/AddOrganizationMember.php b/app/Actions/Jetstream/AddOrganizationMember.php index acee7c3f..47f9ccfa 100644 --- a/app/Actions/Jetstream/AddOrganizationMember.php +++ b/app/Actions/Jetstream/AddOrganizationMember.php @@ -7,6 +7,7 @@ use App\Models\Organization; use App\Models\User; use Closure; +use Illuminate\Contracts\Validation\Rule; use Illuminate\Support\Facades\Gate; use Illuminate\Support\Facades\Validator; use Laravel\Jetstream\Contracts\AddsTeamMembers; @@ -55,7 +56,7 @@ protected function validate(Organization $organization, string $email, ?string $ /** * Get the validation rules for adding a team member. * - * @return array + * @return array> */ protected function rules(): array { diff --git a/app/Actions/Jetstream/InviteOrganizationMember.php b/app/Actions/Jetstream/InviteOrganizationMember.php index e6aef0f4..a688fffa 100644 --- a/app/Actions/Jetstream/InviteOrganizationMember.php +++ b/app/Actions/Jetstream/InviteOrganizationMember.php @@ -8,6 +8,7 @@ use App\Models\OrganizationInvitation; use App\Models\User; use Closure; +use Illuminate\Contracts\Validation\Rule; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Facades\Gate; @@ -59,7 +60,7 @@ protected function validate(Organization $organization, string $email, ?string $ /** * Get the validation rules for inviting a team member. * - * @return array + * @return array> */ protected function rules(Organization $organization): array { diff --git a/app/Exceptions/ApiException.php b/app/Exceptions/ApiException.php new file mode 100644 index 00000000..c4a61eab --- /dev/null +++ b/app/Exceptions/ApiException.php @@ -0,0 +1,24 @@ +json([ + 'error' => true, + 'message' => $this->getMessage(), + ], 400); + } +} diff --git a/app/Exceptions/TimeEntryStillRunning.php b/app/Exceptions/TimeEntryStillRunning.php new file mode 100644 index 00000000..a4ee00a2 --- /dev/null +++ b/app/Exceptions/TimeEntryStillRunning.php @@ -0,0 +1,9 @@ +columns(1) ->schema([ Forms\Components\TextInput::make('name') ->label('Name') ->required() ->maxLength(255), - Forms\Components\Toggle::make('Is personal?') + Forms\Components\Toggle::make('personal_team') ->label('Is personal?') ->required(), - Forms\Components\Select::make('owner_id') + Forms\Components\Select::make('user_id') ->relationship(name: 'owner', titleAttribute: 'email') ->searchable(['name', 'email']) ->required(), @@ -47,7 +48,8 @@ public static function table(Table $table): Table Tables\Columns\TextColumn::make('name') ->searchable() ->sortable(), - Tables\Columns\ToggleColumn::make('is_personal') + Tables\Columns\IconColumn::make('personal_team') + ->boolean() ->label('Is personal?') ->sortable(), Tables\Columns\TextColumn::make('owner.email') diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index e33650fb..a5d3681b 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -25,6 +25,7 @@ class UserResource extends Resource public static function form(Form $form): Form { return $form + ->columns(1) ->schema([ Forms\Components\TextInput::make('id') ->label('ID') diff --git a/app/Http/Controllers/Api/V1/ProjectController.php b/app/Http/Controllers/Api/V1/ProjectController.php index 1758acac..3190ae6e 100644 --- a/app/Http/Controllers/Api/V1/ProjectController.php +++ b/app/Http/Controllers/Api/V1/ProjectController.php @@ -11,11 +11,22 @@ use App\Models\Organization; use App\Models\Project; use Illuminate\Auth\Access\AuthorizationException; +use Illuminate\Http\JsonResponse; use Illuminate\Http\Resources\Json\JsonResource; class ProjectController extends Controller { + protected function checkPermission(Organization $organization, string $permission, ?Project $project = null): void + { + parent::checkPermission($organization, $permission); + if ($project !== null && $project->organization_id !== $organization->id) { + throw new AuthorizationException('Project does not belong to organization'); + } + } + /** + * Get projects + * * @throws AuthorizationException */ public function index(Organization $organization): JsonResource @@ -29,17 +40,22 @@ public function index(Organization $organization): JsonResource } /** + * Get project + * * @throws AuthorizationException */ public function show(Organization $organization, Project $project): JsonResource { - $this->checkPermission($organization, 'projects:view'); + $this->checkPermission($organization, 'projects:view', $project); + $project->load('organization'); return new ProjectResource($project); } /** + * Create project + * * @throws AuthorizationException */ public function store(Organization $organization, ProjectStoreRequest $request): JsonResource @@ -55,11 +71,13 @@ public function store(Organization $organization, ProjectStoreRequest $request): } /** + * Update project + * * @throws AuthorizationException */ public function update(Organization $organization, Project $project, ProjectUpdateRequest $request): JsonResource { - $this->checkPermission($organization, 'projects:update'); + $this->checkPermission($organization, 'projects:update', $project); $project->name = $request->input('name'); $project->color = $request->input('color'); $project->save(); @@ -68,13 +86,17 @@ public function update(Organization $organization, Project $project, ProjectUpda } /** + * Delete project + * * @throws AuthorizationException */ - public function destroy(Organization $organization, Project $project): JsonResource + public function destroy(Organization $organization, Project $project): JsonResponse { - $this->checkPermission($organization, 'projects:delete'); + $this->checkPermission($organization, 'projects:delete', $project); + $project->delete(); - return new ProjectResource($project); + return response() + ->json(null, 204); } } diff --git a/app/Http/Controllers/Api/V1/TimeEntryController.php b/app/Http/Controllers/Api/V1/TimeEntryController.php new file mode 100644 index 00000000..c06bdd34 --- /dev/null +++ b/app/Http/Controllers/Api/V1/TimeEntryController.php @@ -0,0 +1,126 @@ +organization_id !== $organization->getKey()) { + throw new AuthorizationException('Time entry does not belong to organization'); + } + } + + /** + * Get time entries + * + * @throws AuthorizationException + */ + public function index(Organization $organization, TimeEntryIndexRequest $request): JsonResource + { + if ($request->has('user_id') && $request->get('user_id') === Auth::id()) { + $this->checkPermission($organization, 'time-entries:view:own'); + } else { + $this->checkPermission($organization, 'time-entries:view:all'); + } + + $timeEntriesQuery = TimeEntry::query() + ->whereBelongsTo($organization, 'organization'); + + if ($request->has('before')) { + + } + + if ($request->has('after')) { + + } + + if ($request->has('user_id')) { + $timeEntriesQuery->where('user_id', $request->input('user_id')); + } + + $timeEntries = $timeEntriesQuery->get(); + + return new TimeEntryCollection($timeEntries); + } + + /** + * Create time entry + * + * @throws AuthorizationException|TimeEntryStillRunning + */ + public function store(Organization $organization, TimeEntryStoreRequest $request): JsonResource + { + if ($request->get('user_id') === Auth::id()) { + $this->checkPermission($organization, 'time-entries:create:own'); + } else { + $this->checkPermission($organization, 'time-entries:create:all'); + } + + if ($request->get('end') === null && TimeEntry::where('user_id', $request->get('user_id'))->where('end', null)->exists()) { + // TODO: documentation + throw new TimeEntryStillRunning('User already has an active time entry'); + } + + $timeEntry = new TimeEntry(); + $timeEntry->fill($request->validated()); + $timeEntry->organization()->associate($organization); + $timeEntry->save(); + + return new TimeEntryResource($timeEntry); + } + + /** + * Update time entry + * + * @throws AuthorizationException + */ + public function update(Organization $organization, TimeEntry $timeEntry, TimeEntryUpdateRequest $request): JsonResource + { + if ($timeEntry->user_id === Auth::id() && $request->get('user_id') === Auth::id()) { + $this->checkPermission($organization, 'time-entries:update:own', $timeEntry); + } else { + $this->checkPermission($organization, 'time-entries:update:all', $timeEntry); + } + + $timeEntry->fill($request->validated()); + $timeEntry->save(); + + return new TimeEntryResource($timeEntry); + } + + /** + * Delete time entry + * + * @throws AuthorizationException + */ + public function destroy(Organization $organization, TimeEntry $timeEntry): JsonResponse + { + if ($timeEntry->user_id === Auth::id()) { + $this->checkPermission($organization, 'time-entries:delete:own', $timeEntry); + } else { + $this->checkPermission($organization, 'time-entries:delete:all', $timeEntry); + } + + $timeEntry->delete(); + + return response() + ->json(null, 204); + } +} diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index dafb4ad8..a0a4f8af 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -32,6 +32,8 @@ public function version(Request $request): ?string * Defines the props that are shared by default. * * @see https://inertiajs.com/shared-data + * + * @return array */ public function share(Request $request): array { diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 5ec274de..03614395 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -26,5 +26,6 @@ class TrustProxies extends Middleware Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | - Request::HEADER_X_FORWARDED_AWS_ELB; + Request::HEADER_X_FORWARDED_AWS_ELB | + Request::HEADER_X_FORWARDED_TRAEFIK; } diff --git a/app/Http/Requests/V1/Project/ProjectStoreRequest.php b/app/Http/Requests/V1/Project/ProjectStoreRequest.php index 74f7a458..28521784 100644 --- a/app/Http/Requests/V1/Project/ProjectStoreRequest.php +++ b/app/Http/Requests/V1/Project/ProjectStoreRequest.php @@ -12,7 +12,7 @@ class ProjectStoreRequest extends FormRequest /** * Get the validation rules that apply to the request. * - * @return array|string> + * @return array> */ public function rules(): array { diff --git a/app/Http/Requests/V1/Project/ProjectUpdateRequest.php b/app/Http/Requests/V1/Project/ProjectUpdateRequest.php index 1f72dd70..c62be6e1 100644 --- a/app/Http/Requests/V1/Project/ProjectUpdateRequest.php +++ b/app/Http/Requests/V1/Project/ProjectUpdateRequest.php @@ -12,7 +12,7 @@ class ProjectUpdateRequest extends FormRequest /** * Get the validation rules that apply to the request. * - * @return array|string> + * @return array> */ public function rules(): array { diff --git a/app/Http/Requests/V1/TimeEntry/TimeEntryIndexRequest.php b/app/Http/Requests/V1/TimeEntry/TimeEntryIndexRequest.php new file mode 100644 index 00000000..7e414b0a --- /dev/null +++ b/app/Http/Requests/V1/TimeEntry/TimeEntryIndexRequest.php @@ -0,0 +1,51 @@ +> + */ + public function rules(): array + { + return [ + 'user_id' => [ + 'string', + 'uuid', + new ExistsEloquent(User::class, null, function (Builder $builder): Builder { + /** @var Builder $builder */ + return $builder->whereHas('organizations', function (Builder $builder) { + /** @var Builder $builder */ + return $builder->whereKey($this->organization->getKey()); + }); + }), + ], + 'before' => [ + 'nullable', + 'string', + 'date_format:Y-m-d', + 'before:after', + ], + 'after' => [ + 'nullable', + 'string', + 'date_format:Y-m-d', + ], + ]; + } +} diff --git a/app/Http/Requests/V1/TimeEntry/TimeEntryStoreRequest.php b/app/Http/Requests/V1/TimeEntry/TimeEntryStoreRequest.php new file mode 100644 index 00000000..e88050c9 --- /dev/null +++ b/app/Http/Requests/V1/TimeEntry/TimeEntryStoreRequest.php @@ -0,0 +1,83 @@ +> + */ + public function rules(): array + { + return [ + 'user_id' => [ + 'required', + 'string', + 'uuid', + new ExistsEloquent(User::class, null, function (Builder $builder): Builder { + /** @var Builder $builder */ + return $builder->whereHas('organizations', function (Builder $builder) { + /** @var Builder $builder */ + return $builder->whereKey($this->organization->getKey()); + }); + }), + ], + 'task_id' => [ + 'nullable', + 'string', + 'uuid', + new ExistsEloquent(Task::class, null, function (Builder $builder): Builder { + /** @var Builder $builder */ + return $builder->whereBelongsTo($this->organization, 'organization'); + }), + ], + // Start of time entry (ISO 8601 format, UTC timezone) + 'start' => [ + 'required', + 'date', // TODO + ], + // End of time entry (ISO 8601 format, UTC timezone) + 'end' => [ + 'required', + 'nullable', + 'date', // TODO + 'after:start', + ], + // Description of time entry + 'description' => [ + 'nullable', + 'string', + 'max:255', + ], + // List of tag IDs + 'tags' => [ + 'nullable', + 'array', + ], + 'tags.*' => [ + 'string', + 'uuid', + new ExistsEloquent(Tag::class, null, function (Builder $builder): Builder { + /** @var Builder $builder */ + return $builder->whereBelongsTo($this->organization, 'organization'); + }), + ], + ]; + } +} diff --git a/app/Http/Requests/V1/TimeEntry/TimeEntryUpdateRequest.php b/app/Http/Requests/V1/TimeEntry/TimeEntryUpdateRequest.php new file mode 100644 index 00000000..4ab7525c --- /dev/null +++ b/app/Http/Requests/V1/TimeEntry/TimeEntryUpdateRequest.php @@ -0,0 +1,70 @@ +> + */ + public function rules(): array + { + return [ + 'task_id' => [ + 'nullable', + 'string', + 'uuid', + new ExistsEloquent(Task::class, null, function (Builder $builder): Builder { + /** @var Builder $builder */ + return $builder->whereBelongsTo($this->organization, 'organization'); + }), + ], + // Start of time entry (ISO 8601 format, UTC timezone) + 'start' => [ + 'required', + 'date', // TODO + ], + // End of time entry (ISO 8601 format, UTC timezone) + 'end' => [ + 'required', + 'nullable', + 'date', // TODO + 'after:start', + ], + // Description of time entry + 'description' => [ + 'nullable', + 'string', + 'max:255', + ], + // List of tag IDs + 'tags' => [ + 'nullable', + 'array', + ], + 'tags.*' => [ + 'string', + 'uuid', + new ExistsEloquent(Tag::class, null, function (Builder $builder): Builder { + /** @var Builder $builder */ + return $builder->whereBelongsTo($this->organization, 'organization'); + }), + ], + ]; + } +} diff --git a/app/Http/Resources/V1/TimeEntry/TimeEntryCollection.php b/app/Http/Resources/V1/TimeEntry/TimeEntryCollection.php new file mode 100644 index 00000000..0dba3161 --- /dev/null +++ b/app/Http/Resources/V1/TimeEntry/TimeEntryCollection.php @@ -0,0 +1,17 @@ + + */ + public function toArray(Request $request): array + { + return [ + /** @var string $id ID of time entry */ + 'id' => $this->resource->id, + ]; + } +} diff --git a/app/Models/OrganizationInvitation.php b/app/Models/OrganizationInvitation.php index b47aea10..0f60d31f 100644 --- a/app/Models/OrganizationInvitation.php +++ b/app/Models/OrganizationInvitation.php @@ -36,6 +36,8 @@ class OrganizationInvitation extends JetstreamTeamInvitation /** * Get the organization that the invitation belongs to. + * + * @return BelongsTo */ public function organization(): BelongsTo { @@ -44,6 +46,8 @@ public function organization(): BelongsTo /** * Get the organization that the invitation belongs to. + * + * @return BelongsTo */ public function team(): BelongsTo { diff --git a/app/Models/TimeEntry.php b/app/Models/TimeEntry.php index b47e6879..5e8e44df 100644 --- a/app/Models/TimeEntry.php +++ b/app/Models/TimeEntry.php @@ -19,9 +19,13 @@ * @property Carbon|null $end * @property bool $billable * @property array $tags + * @property string $user_id * @property-read User $user + * @property string $organization_id * @property-read Organization $organization + * @property string|null $project_id * @property-read Project|null $project + * @property string|null $task_id * @property-read Task|null $task * * @method static TimeEntryFactory factory() diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index e9d101b1..b027f23f 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -13,9 +13,15 @@ use App\Models\Task; use App\Models\TimeEntry; use App\Models\User; +use Dedoc\Scramble\Scramble; +use Dedoc\Scramble\Support\Generator\OpenApi; +use Dedoc\Scramble\Support\Generator\SecurityScheme; +use Dedoc\Scramble\Support\Generator\SecuritySchemes\OAuthFlow; use Filament\Forms\Components\Section; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\Relation; +use Illuminate\Support\Facades\App; +use Illuminate\Support\Facades\URL; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider @@ -55,5 +61,19 @@ public function boot(): void Section::configureUsing(function (Section $section): void { $section->columns(1); }, null, true); + + Scramble::extendOpenApi(function (OpenApi $openApi) { + $openApi->secure( + SecurityScheme::oauth2() + ->flow('authorizationCode', function (OAuthFlow $flow) { + $flow + ->authorizationUrl('https://solidtime.test/oauth/authorize'); + }) + ); + }); + + if (config('app.force_https', false) || App::isProduction()) { + URL::forceScheme('https'); + } } } diff --git a/app/Providers/JetstreamServiceProvider.php b/app/Providers/JetstreamServiceProvider.php index b306a01b..08d2db1e 100644 --- a/app/Providers/JetstreamServiceProvider.php +++ b/app/Providers/JetstreamServiceProvider.php @@ -56,6 +56,14 @@ protected function configurePermissions(): void 'projects:create', 'projects:update', 'projects:delete', + 'time-entries:view:all', + 'time-entries:create:all', + 'time-entries:update:all', + 'time-entries:delete:all', + 'time-entries:view:own', + 'time-entries:create:own', + 'time-entries:update:own', + 'time-entries:delete:own', ])->description('Administrator users can perform any action.'); Jetstream::role('manager', 'Manager', [ @@ -63,13 +71,22 @@ protected function configurePermissions(): void 'projects:create', 'projects:update', 'projects:delete', + 'time-entries:view:all', + 'time-entries:create:all', + 'time-entries:update:all', + 'time-entries:delete:all', + 'time-entries:view:own', + 'time-entries:create:own', + 'time-entries:update:own', + 'time-entries:delete:own', ])->description('Editor users have the ability to read, create, and update.'); Jetstream::role('employee', 'Employee', [ 'projects:view', - 'projects:create', - 'projects:update', - 'projects:delete', + 'time-entries:view:own', + 'time-entries:create:own', + 'time-entries:update:own', + 'time-entries:delete:own', ])->description('Editor users have the ability to read, create, and update.'); } } diff --git a/composer.json b/composer.json index d051ee81..90109f5c 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,12 @@ { - "name": "timetracking-project/timetracking", + "name": "solidtime-io/solidtime", "type": "project", "description": "An open-source time-tracking app", "keywords": [], "license": "AGPL-3.0-or-later", "require": { - "php": "^8.1", + "php": "8.1.*", + "dedoc/scramble": "^0.8.5", "filament/filament": "^3.2", "guzzlehttp/guzzle": "^7.2", "inertiajs/inertia-laravel": "^0.6.8", diff --git a/composer.lock b/composer.lock index e4759af3..a2685a97 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "53e9ad1ac7367efb5c1d7c971499447b", + "content-hash": "a5ece6a5dc66b5813bf1d4dd3947c0ee", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -555,6 +555,81 @@ }, "time": "2023-08-25T16:18:39+00:00" }, + { + "name": "dedoc/scramble", + "version": "v0.8.5", + "source": { + "type": "git", + "url": "https://github.com/dedoc/scramble.git", + "reference": "cc61cc79843c6e2206dc5d0f15ae705494de8249" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dedoc/scramble/zipball/cc61cc79843c6e2206dc5d0f15ae705494de8249", + "reference": "cc61cc79843c6e2206dc5d0f15ae705494de8249", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0.0|^9.0.0|^10.0.0", + "nikic/php-parser": "^4.0", + "php": "^8.1", + "phpstan/phpdoc-parser": "^1.0", + "spatie/laravel-package-tools": "^1.9.2" + }, + "require-dev": { + "doctrine/dbal": "^3.4", + "laravel/pint": "^v1.1.0", + "nunomaduro/collision": "^5.0|^v6.0", + "orchestra/testbench": "^6.0|^7.0|^8.0", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.2", + "phpunit/phpunit": "^9.5", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Dedoc\\Scramble\\ScrambleServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Dedoc\\Scramble\\": "src", + "Dedoc\\Scramble\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Lytvynenko", + "email": "litvinenko95@gmail.com", + "role": "Developer" + } + ], + "description": "Automatic generation of API documentation for Laravel applications.", + "homepage": "https://github.com/dedoc/scramble", + "keywords": [ + "documentation", + "laravel", + "openapi" + ], + "support": { + "issues": "https://github.com/dedoc/scramble/issues", + "source": "https://github.com/dedoc/scramble/tree/v0.8.5" + }, + "funding": [ + { + "url": "https://github.com/romalytvynenko", + "type": "github" + } + ], + "time": "2023-12-02T09:58:18+00:00" + }, { "name": "defuse/php-encryption", "version": "v2.4.0", @@ -905,16 +980,16 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -946,9 +1021,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/event-manager", @@ -1043,16 +1118,16 @@ }, { "name": "doctrine/inflector", - "version": "2.0.9", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/2930cd5ef353871c821d5c43ed030d39ac8cfe65", - "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { @@ -1114,7 +1189,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.9" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -1130,31 +1205,31 @@ "type": "tidelift" } ], - "time": "2024-01-15T18:05:13+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/lexer", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "84a527db05647743d50373e0ec53a152f2cde568" + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", - "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.9", - "phpunit/phpunit": "^9.5", + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.5", "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.0" + "vimeo/psalm": "^5.21" }, "type": "library", "autoload": { @@ -1191,7 +1266,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.0" + "source": "https://github.com/doctrine/lexer/tree/3.0.1" }, "funding": [ { @@ -1207,7 +1282,7 @@ "type": "tidelift" } ], - "time": "2022-12-15T16:57:16+00:00" + "time": "2024-02-05T11:56:58+00:00" }, { "name": "dragonmantank/cron-expression", @@ -2639,20 +2714,20 @@ }, { "name": "laravel/framework", - "version": "v10.42.0", + "version": "v10.45.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "fef1aff874a6749c44f8e142e5764eab8cb96890" + "reference": "dcf5d1d722b84ad38a5e053289130b6962f830bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/fef1aff874a6749c44f8e142e5764eab8cb96890", - "reference": "fef1aff874a6749c44f8e142e5764eab8cb96890", + "url": "https://api.github.com/repos/laravel/framework/zipball/dcf5d1d722b84ad38a5e053289130b6962f830bd", + "reference": "dcf5d1d722b84ad38a5e053289130b6962f830bd", "shasum": "" }, "require": { - "brick/math": "^0.9.3|^0.10.2|^0.11", + "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", "composer-runtime-api": "^2.2", "doctrine/inflector": "^2.0.5", "dragonmantank/cron-expression": "^3.3.2", @@ -2696,6 +2771,7 @@ "conflict": { "carbonphp/carbon-doctrine-types": ">=3.0", "doctrine/dbal": ">=4.0", + "phpunit/phpunit": ">=11.0.0", "tightenco/collect": "<5.5.33" }, "provide": { @@ -2840,7 +2916,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-01-23T15:07:56+00:00" + "time": "2024-02-21T14:07:36+00:00" }, { "name": "laravel/jetstream", @@ -3311,16 +3387,16 @@ }, { "name": "league/commonmark", - "version": "2.4.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "3669d6d5f7a47a93c08ddff335e6d945481a1dd5" + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/3669d6d5f7a47a93c08ddff335e6d945481a1dd5", - "reference": "3669d6d5f7a47a93c08ddff335e6d945481a1dd5", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", "shasum": "" }, "require": { @@ -3333,7 +3409,7 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.0", + "commonmark/cmark": "0.30.3", "commonmark/commonmark.js": "0.30.0", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", @@ -3343,10 +3419,10 @@ "michelf/php-markdown": "^1.4 || ^2.0", "nyholm/psr7": "^1.5", "phpstan/phpstan": "^1.8.2", - "phpunit/phpunit": "^9.5.21", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "symfony/finder": "^5.3 | ^6.0 || ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", "unleashedtech/php-coding-standard": "^3.1.1", "vimeo/psalm": "^4.24.0 || ^5.0.0" }, @@ -3413,7 +3489,7 @@ "type": "tidelift" } ], - "time": "2023-08-30T16:55:00+00:00" + "time": "2024-02-02T11:59:32+00:00" }, { "name": "league/config", @@ -3641,16 +3717,16 @@ }, { "name": "league/flysystem", - "version": "3.23.1", + "version": "3.24.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e" + "reference": "b25a361508c407563b34fac6f64a8a17a8819675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e", - "reference": "199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b25a361508c407563b34fac6f64a8a17a8819675", + "reference": "b25a361508c407563b34fac6f64a8a17a8819675", "shasum": "" }, "require": { @@ -3670,7 +3746,7 @@ "require-dev": { "async-aws/s3": "^1.5 || ^2.0", "async-aws/simple-s3": "^1.1 || ^2.0", - "aws/aws-sdk-php": "^3.220.0", + "aws/aws-sdk-php": "^3.295.10", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", @@ -3681,7 +3757,7 @@ "phpseclib/phpseclib": "^3.0.34", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", - "sabre/dav": "^4.3.1" + "sabre/dav": "^4.6.0" }, "type": "library", "autoload": { @@ -3715,7 +3791,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.23.1" + "source": "https://github.com/thephpleague/flysystem/tree/3.24.0" }, "funding": [ { @@ -3727,7 +3803,7 @@ "type": "github" } ], - "time": "2024-01-26T18:42:03+00:00" + "time": "2024-02-04T12:10:17+00:00" }, { "name": "league/flysystem-local", @@ -3791,16 +3867,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.14.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "b6a5854368533df0295c5761a0253656a2e52d9e" + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b6a5854368533df0295c5761a0253656a2e52d9e", - "reference": "b6a5854368533df0295c5761a0253656a2e52d9e", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", "shasum": "" }, "require": { @@ -3831,7 +3907,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.14.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.15.0" }, "funding": [ { @@ -3843,7 +3919,7 @@ "type": "tidelift" } ], - "time": "2023-10-17T14:13:20+00:00" + "time": "2024-01-28T23:22:08+00:00" }, { "name": "league/oauth2-server", @@ -4416,16 +4492,16 @@ }, { "name": "nesbot/carbon", - "version": "2.72.2", + "version": "2.72.3", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "3e7edc41b58d65509baeb0d4a14c8fa41d627130" + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/3e7edc41b58d65509baeb0d4a14c8fa41d627130", - "reference": "3e7edc41b58d65509baeb0d4a14c8fa41d627130", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", + "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", "shasum": "" }, "require": { @@ -4519,7 +4595,7 @@ "type": "tidelift" } ], - "time": "2024-01-19T00:21:53+00:00" + "time": "2024-01-25T10:35:09+00:00" }, { "name": "nette/schema", @@ -4671,27 +4747,25 @@ }, { "name": "nikic/php-parser", - "version": "v5.0.0", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.4" + "php": ">=7.0" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -4699,7 +4773,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -4723,9 +4797,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" }, - "time": "2024-01-07T17:17:35+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "nunomaduro/termwind", @@ -5286,6 +5360,53 @@ ], "time": "2023-12-29T01:59:53+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.25.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240", + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0" + }, + "time": "2024-01-04T17:06:16+00:00" + }, { "name": "pragmarx/google2fa", "version": "v8.0.1", @@ -6423,16 +6544,16 @@ }, { "name": "symfony/console", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", - "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", + "url": "https://api.github.com/repos/symfony/console/zipball/2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", + "reference": "2aaf83b4de5b9d43b93e4aec6f2f8b676f7c567e", "shasum": "" }, "require": { @@ -6497,7 +6618,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.2" + "source": "https://github.com/symfony/console/tree/v6.4.3" }, "funding": [ { @@ -6513,20 +6634,20 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:15:48+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/css-selector", - "version": "v7.0.0", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "bb51d46e53ef8d50d523f0c5faedba056a27943e" + "reference": "ec60a4edf94e63b0556b6a0888548bb400a3a3be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/bb51d46e53ef8d50d523f0c5faedba056a27943e", - "reference": "bb51d46e53ef8d50d523f0c5faedba056a27943e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/ec60a4edf94e63b0556b6a0888548bb400a3a3be", + "reference": "ec60a4edf94e63b0556b6a0888548bb400a3a3be", "shasum": "" }, "require": { @@ -6562,7 +6683,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.0.0" + "source": "https://github.com/symfony/css-selector/tree/v7.0.3" }, "funding": [ { @@ -6578,7 +6699,7 @@ "type": "tidelift" } ], - "time": "2023-10-31T17:59:56+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6649,16 +6770,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c873490a1c97b3a0a4838afc36ff36c112d02788" + "reference": "6dc3c76a278b77f01d864a6005d640822c6f26a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c873490a1c97b3a0a4838afc36ff36c112d02788", - "reference": "c873490a1c97b3a0a4838afc36ff36c112d02788", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/6dc3c76a278b77f01d864a6005d640822c6f26a6", + "reference": "6dc3c76a278b77f01d864a6005d640822c6f26a6", "shasum": "" }, "require": { @@ -6704,7 +6825,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.0" + "source": "https://github.com/symfony/error-handler/tree/v6.4.3" }, "funding": [ { @@ -6720,20 +6841,20 @@ "type": "tidelift" } ], - "time": "2023-10-18T09:43:34+00:00" + "time": "2024-01-29T15:40:36+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.0.2", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a" + "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/098b62ae81fdd6cbf941f355059f617db28f4f9a", - "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/834c28d533dd0636f910909d01b9ff45cc094b5e", + "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e", "shasum": "" }, "require": { @@ -6784,7 +6905,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.2" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.3" }, "funding": [ { @@ -6800,7 +6921,7 @@ "type": "tidelift" } ], - "time": "2023-12-27T22:24:19+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -7013,16 +7134,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "172d807f9ef3fc3fbed8377cc57c20d389269271" + "reference": "5677bdf7cade4619cb17fc9e1e7b31ec392244a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/172d807f9ef3fc3fbed8377cc57c20d389269271", - "reference": "172d807f9ef3fc3fbed8377cc57c20d389269271", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5677bdf7cade4619cb17fc9e1e7b31ec392244a9", + "reference": "5677bdf7cade4619cb17fc9e1e7b31ec392244a9", "shasum": "" }, "require": { @@ -7070,7 +7191,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.2" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.3" }, "funding": [ { @@ -7086,20 +7207,20 @@ "type": "tidelift" } ], - "time": "2023-12-27T22:16:42+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "13e8387320b5942d0dc408440c888e2d526efef4" + "reference": "9c6ec4e543044f7568a53a76ab1484ecd30637a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/13e8387320b5942d0dc408440c888e2d526efef4", - "reference": "13e8387320b5942d0dc408440c888e2d526efef4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9c6ec4e543044f7568a53a76ab1484ecd30637a2", + "reference": "9c6ec4e543044f7568a53a76ab1484ecd30637a2", "shasum": "" }, "require": { @@ -7183,7 +7304,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.2" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.3" }, "funding": [ { @@ -7199,20 +7320,20 @@ "type": "tidelift" } ], - "time": "2023-12-30T15:31:44+00:00" + "time": "2024-01-31T07:21:29+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "6da89e5c9202f129717a770a03183fb140720168" + "reference": "74412c62f88a85a41b61f0b71ab0afcaad6f03ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/6da89e5c9202f129717a770a03183fb140720168", - "reference": "6da89e5c9202f129717a770a03183fb140720168", + "url": "https://api.github.com/repos/symfony/mailer/zipball/74412c62f88a85a41b61f0b71ab0afcaad6f03ee", + "reference": "74412c62f88a85a41b61f0b71ab0afcaad6f03ee", "shasum": "" }, "require": { @@ -7263,7 +7384,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.2" + "source": "https://github.com/symfony/mailer/tree/v6.4.3" }, "funding": [ { @@ -7279,20 +7400,20 @@ "type": "tidelift" } ], - "time": "2023-12-19T09:12:31+00:00" + "time": "2024-01-29T15:01:07+00:00" }, { "name": "symfony/mime", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ca4f58b2ef4baa8f6cecbeca2573f88cd577d205" + "reference": "5017e0a9398c77090b7694be46f20eb796262a34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ca4f58b2ef4baa8f6cecbeca2573f88cd577d205", - "reference": "ca4f58b2ef4baa8f6cecbeca2573f88cd577d205", + "url": "https://api.github.com/repos/symfony/mime/zipball/5017e0a9398c77090b7694be46f20eb796262a34", + "reference": "5017e0a9398c77090b7694be46f20eb796262a34", "shasum": "" }, "require": { @@ -7347,7 +7468,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.0" + "source": "https://github.com/symfony/mime/tree/v6.4.3" }, "funding": [ { @@ -7363,20 +7484,20 @@ "type": "tidelift" } ], - "time": "2023-10-17T11:49:05+00:00" + "time": "2024-01-30T08:32:12+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -7390,9 +7511,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7429,7 +7547,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -7445,20 +7563,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -7469,9 +7587,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7510,7 +7625,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -7526,20 +7641,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", + "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", "shasum": "" }, "require": { @@ -7552,9 +7667,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7597,7 +7709,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" }, "funding": [ { @@ -7613,20 +7725,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -7637,9 +7749,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7681,7 +7790,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -7697,20 +7806,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -7724,9 +7833,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7764,7 +7870,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -7780,20 +7886,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", + "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", "shasum": "" }, "require": { @@ -7801,9 +7907,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7840,7 +7943,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" }, "funding": [ { @@ -7856,20 +7959,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -7877,9 +7980,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -7923,7 +8023,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -7939,20 +8039,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11" + "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", - "reference": "b0f46ebbeeeda3e9d2faebdfbf4b4eae9b59fa11", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", + "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", "shasum": "" }, "require": { @@ -7961,9 +8061,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -8003,7 +8100,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" }, "funding": [ { @@ -8019,20 +8116,20 @@ "type": "tidelift" } ], - "time": "2023-08-16T06:22:46+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "9c44518a5aff8da565c8a55dbe85d2769e6f630e" + "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/9c44518a5aff8da565c8a55dbe85d2769e6f630e", - "reference": "9c44518a5aff8da565c8a55dbe85d2769e6f630e", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", + "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853", "shasum": "" }, "require": { @@ -8046,9 +8143,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -8085,7 +8179,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0" }, "funding": [ { @@ -8101,20 +8195,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" + "reference": "31642b0818bfcff85930344ef93193f8c607e0a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", - "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", + "url": "https://api.github.com/repos/symfony/process/zipball/31642b0818bfcff85930344ef93193f8c607e0a3", + "reference": "31642b0818bfcff85930344ef93193f8c607e0a3", "shasum": "" }, "require": { @@ -8146,7 +8240,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.2" + "source": "https://github.com/symfony/process/tree/v6.4.3" }, "funding": [ { @@ -8162,7 +8256,7 @@ "type": "tidelift" } ], - "time": "2023-12-22T16:42:54+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -8255,16 +8349,16 @@ }, { "name": "symfony/routing", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "98eab13a07fddc85766f1756129c69f207ffbc21" + "reference": "3b2957ad54902f0f544df83e3d58b38d7e8e5842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/98eab13a07fddc85766f1756129c69f207ffbc21", - "reference": "98eab13a07fddc85766f1756129c69f207ffbc21", + "url": "https://api.github.com/repos/symfony/routing/zipball/3b2957ad54902f0f544df83e3d58b38d7e8e5842", + "reference": "3b2957ad54902f0f544df83e3d58b38d7e8e5842", "shasum": "" }, "require": { @@ -8318,7 +8412,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.2" + "source": "https://github.com/symfony/routing/tree/v6.4.3" }, "funding": [ { @@ -8334,7 +8428,7 @@ "type": "tidelift" } ], - "time": "2023-12-29T15:34:34+00:00" + "time": "2024-01-30T13:55:02+00:00" }, { "name": "symfony/service-contracts", @@ -8420,16 +8514,16 @@ }, { "name": "symfony/string", - "version": "v7.0.2", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5" + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/cc78f14f91f5e53b42044d0620961c48028ff9f5", - "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5", + "url": "https://api.github.com/repos/symfony/string/zipball/524aac4a280b90a4420d8d6a040718d0586505ac", + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac", "shasum": "" }, "require": { @@ -8486,7 +8580,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.2" + "source": "https://github.com/symfony/string/tree/v7.0.3" }, "funding": [ { @@ -8502,20 +8596,20 @@ "type": "tidelift" } ], - "time": "2023-12-10T16:54:46+00:00" + "time": "2024-01-29T15:41:16+00:00" }, { "name": "symfony/translation", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681" + "reference": "637c51191b6b184184bbf98937702bcf554f7d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", - "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", + "url": "https://api.github.com/repos/symfony/translation/zipball/637c51191b6b184184bbf98937702bcf554f7d04", + "reference": "637c51191b6b184184bbf98937702bcf554f7d04", "shasum": "" }, "require": { @@ -8538,7 +8632,7 @@ "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { - "nikic/php-parser": "^4.13", + "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", "symfony/config": "^5.4|^6.0|^7.0", "symfony/console": "^5.4|^6.0|^7.0", @@ -8581,7 +8675,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.2" + "source": "https://github.com/symfony/translation/tree/v6.4.3" }, "funding": [ { @@ -8597,7 +8691,7 @@ "type": "tidelift" } ], - "time": "2023-12-18T09:25:29+00:00" + "time": "2024-01-29T13:11:52+00:00" }, { "name": "symfony/translation-contracts", @@ -8679,16 +8773,16 @@ }, { "name": "symfony/uid", - "version": "v6.4.0", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "8092dd1b1a41372110d06374f99ee62f7f0b9a92" + "reference": "1d31267211cc3a2fff32bcfc7c1818dac41b6fc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/8092dd1b1a41372110d06374f99ee62f7f0b9a92", - "reference": "8092dd1b1a41372110d06374f99ee62f7f0b9a92", + "url": "https://api.github.com/repos/symfony/uid/zipball/1d31267211cc3a2fff32bcfc7c1818dac41b6fc0", + "reference": "1d31267211cc3a2fff32bcfc7c1818dac41b6fc0", "shasum": "" }, "require": { @@ -8733,7 +8827,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.4.0" + "source": "https://github.com/symfony/uid/tree/v6.4.3" }, "funding": [ { @@ -8749,20 +8843,20 @@ "type": "tidelift" } ], - "time": "2023-10-31T08:18:17+00:00" + "time": "2024-01-23T14:51:35+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.2", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f" + "reference": "0435a08f69125535336177c29d56af3abc1f69da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", - "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0435a08f69125535336177c29d56af3abc1f69da", + "reference": "0435a08f69125535336177c29d56af3abc1f69da", "shasum": "" }, "require": { @@ -8818,7 +8912,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.3" }, "funding": [ { @@ -8834,7 +8928,7 @@ "type": "tidelift" } ], - "time": "2023-12-28T19:16:56+00:00" + "time": "2024-01-23T14:53:30+00:00" }, { "name": "tightenco/ziggy", diff --git a/config/app.php b/config/app.php index 3e4cd58d..0fb38670 100644 --- a/config/app.php +++ b/config/app.php @@ -61,6 +61,8 @@ 'asset_url' => env('ASSET_URL'), + 'force_https' => env('APP_FORCE_HTTPS', false), + /* |-------------------------------------------------------------------------- | Application Timezone diff --git a/config/scramble.php b/config/scramble.php new file mode 100644 index 00000000..6bc087ff --- /dev/null +++ b/config/scramble.php @@ -0,0 +1,78 @@ + 'api', + + /* + * Your API domain. By default, app domain is used. This is also a part of the default API routes + * matcher, so when implementing your own, make sure you use this config if needed. + */ + 'api_domain' => null, + + 'info' => [ + /* + * API version. + */ + 'version' => '0.0.1', + + /* + * Description rendered on the home page of the API documentation (`/docs/api`). + */ + 'description' => '', + ], + + /* + * Customize Stoplight Elements UI + */ + 'ui' => [ + /* + * Hide the `Try It` feature. Enabled by default. + */ + 'hide_try_it' => false, + + /* + * URL to an image that displays as a small square logo next to the title, above the table of contents. + */ + 'logo' => '', + + /* + * Use to fetch the credential policy for the Try It feature. Options are: omit, include (default), and same-origin + */ + 'try_it_credentials_policy' => 'include', + ], + + /* + * The list of servers of the API. By default, when `null`, server URL will be created from + * `scramble.api_path` and `scramble.api_domain` config variables. When providing an array, you + * will need to specify the local server URL manually (if needed). + * + * Example of non-default config (final URLs are generated using Laravel `url` helper): + * + * ```php + * 'servers' => [ + * 'Live' => 'api', + * 'Prod' => 'https://scramble.dedoc.co/api', + * ], + * ``` + */ + 'servers' => [ + 'Production' => 'https://app.solidtime.io', + 'Staging' => 'https://app.staging.solidtime.io', + 'Local' => 'https://soldtime.test', + ], + + 'middleware' => [ + 'web', + RestrictedDocsAccess::class, + ], + + 'extensions' => [], +]; diff --git a/database/factories/TimeEntryFactory.php b/database/factories/TimeEntryFactory.php index 1fdad027..1220d1bb 100644 --- a/database/factories/TimeEntryFactory.php +++ b/database/factories/TimeEntryFactory.php @@ -6,6 +6,7 @@ use App\Models\Organization; use App\Models\Project; +use App\Models\Tag; use App\Models\Task; use App\Models\TimeEntry; use App\Models\User; @@ -36,6 +37,18 @@ public function definition(): array ]; } + public function withTags(Organization $organization): self + { + return $this->state(function (array $attributes) use ($organization): array { + return [ + 'tags' => [ + Tag::factory()->forOrganization($organization)->create()->getKey(), + Tag::factory()->forOrganization($organization)->create()->getKey(), + ], + ]; + }); + } + public function forUser(User $user): self { return $this->state(function (array $attributes) use ($user) { diff --git a/docker-compose.yml b/docker-compose.yml index 3805c45a..876bcfe0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,12 +9,12 @@ services: labels: - "traefik.enable=true" - "traefik.docker.network=${NETWORK_NAME}" - - "traefik.http.routers.timetracking.rule=Host(`${NGINX_HOST_NAME}`)" - - "traefik.http.routers.timetracking.entrypoints=web" - - "traefik.http.services.timetracking.loadbalancer.server.port=80" - - "traefik.http.routers.timetracking-https.rule=Host(`${NGINX_HOST_NAME}`)" - - "traefik.http.routers.timetracking-https.entrypoints=websecure" - - "traefik.http.routers.timetracking-https.tls=true" + - "traefik.http.routers.solidtime.rule=Host(`${NGINX_HOST_NAME}`)" + - "traefik.http.routers.solidtime.entrypoints=web" + - "traefik.http.services.solidtime.loadbalancer.server.port=80" + - "traefik.http.routers.solidtime-https.rule=Host(`${NGINX_HOST_NAME}`)" + - "traefik.http.routers.solidtime-https.entrypoints=websecure" + - "traefik.http.routers.solidtime-https.tls=true" extra_hosts: - 'host.docker.internal:host-gateway' ports: @@ -59,9 +59,6 @@ services: timeout: 5s mailpit: image: 'axllent/mailpit:latest' - ports: - - '${FORWARD_MAILPIT_PORT:-1025}:1025' - - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025' networks: - sail playwright: diff --git a/phpstan.neon b/phpstan.neon index df74d87e..273e51aa 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,4 +7,4 @@ parameters: - app/ # Level 9 is the highest level - level: 5 + level: 7 diff --git a/routes/api.php b/routes/api.php index 5aa3c0c7..6970f86c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -3,7 +3,9 @@ declare(strict_types=1); use App\Http\Controllers\Api\V1\ProjectController; +use App\Http\Controllers\Api\V1\TimeEntryController; use Illuminate\Support\Facades\Route; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /* |-------------------------------------------------------------------------- @@ -25,4 +27,21 @@ Route::delete('/organization/{organization}/projects/{project}', [ProjectController::class, 'destroy'])->name('destroy'); }); + Route::name('time-entries.')->group(static function () { + Route::get('/organization/{organization}/time-entries', [TimeEntryController::class, 'index'])->name('index'); + Route::post('/organization/{organization}/time-entries', [TimeEntryController::class, 'store'])->name('store'); + Route::put('/organization/{organization}/time-entries/{timeEntry}', [TimeEntryController::class, 'update'])->name('update'); + Route::delete('/organization/{organization}/time-entries/{timeEntry}', [TimeEntryController::class, 'destroy'])->name('destroy'); + }); +}); + +/** + * Fallback routes, to prevent a rendered HTML page in /api/* routes + * The / route is also included since the fallback is not triggered on the root route + */ +Route::get('/', function (): void { + throw new NotFoundHttpException('API resource not found'); +}); +Route::fallback(function (): void { + throw new NotFoundHttpException('API resource not found'); }); diff --git a/tests/Unit/Endpoint/Api/V1/ApiEndpointTestAbstract.php b/tests/Unit/Endpoint/Api/V1/ApiEndpointTestAbstract.php new file mode 100644 index 00000000..5cc0a549 --- /dev/null +++ b/tests/Unit/Endpoint/Api/V1/ApiEndpointTestAbstract.php @@ -0,0 +1,35 @@ + $permissions + * @return object{user: User, organization: Organization} + */ + protected function createUserWithPermission(array $permissions): object + { + Jetstream::role('custom-test', 'Custom Test', $permissions)->description('Role custom for testing'); + $organization = Organization::factory()->create(); + $user = User::factory()->create(); + $organization->users()->attach($user, [ + 'role' => 'custom-test', + ]); + + return (object) [ + 'user' => $user, + 'organization' => $organization, + ]; + } +} diff --git a/tests/Unit/Endpoint/Api/V1/ProjectEndpointTest.php b/tests/Unit/Endpoint/Api/V1/ProjectEndpointTest.php index 9a5fd007..189aeed7 100644 --- a/tests/Unit/Endpoint/Api/V1/ProjectEndpointTest.php +++ b/tests/Unit/Endpoint/Api/V1/ProjectEndpointTest.php @@ -6,35 +6,10 @@ use App\Models\Organization; use App\Models\Project; -use App\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; -use Laravel\Jetstream\Jetstream; use Laravel\Passport\Passport; -use Tests\TestCase; -class ProjectEndpointTest extends TestCase +class ProjectEndpointTest extends ApiEndpointTestAbstract { - use RefreshDatabase; - - /** - * @param array $permissions - * @return object{user: User, organization: Organization} - */ - private function createUserWithPermission(array $permissions): object - { - Jetstream::role('custom-test', 'Custom Test', $permissions)->description('Role custom for testing'); - $organization = Organization::factory()->create(); - $user = User::factory()->create(); - $organization->users()->attach($user, [ - 'role' => 'custom-test', - ]); - - return (object) [ - 'user' => $user, - 'organization' => $organization, - ]; - } - public function test_index_endpoint_fails_if_user_has_no_permission_to_view_projects(): void { // Arrange @@ -67,16 +42,68 @@ public function test_index_endpoint_returns_list_of_all_projects_of_organization $response->assertJsonCount(4, 'data'); } + public function test_show_endpoint_fails_if_user_is_not_part_of_project_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'projects:view', + ]); + $otherOrganization = Organization::factory()->create(); + $project = Project::factory()->forOrganization($otherOrganization)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.projects.show', [$data->organization->getKey(), $project->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_show_endpoint_fails_if_user_has_no_permission_to_view_projects(): void + { + // Arrange + $data = $this->createUserWithPermission([ + ]); + $project = Project::factory()->forOrganization($data->organization)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.projects.show', [$data->organization->getKey(), $project->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_show_endpoint_returns_project(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'projects:view', + ]); + $project = Project::factory()->forOrganization($data->organization)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.projects.show', [$data->organization->getKey(), $project->getKey()])); + + // Assert + $response->assertStatus(200); + $response->assertJsonPath('data.id', $project->getKey()); + } + public function test_store_endpoint_fails_if_user_has_no_permission_to_create_projects(): void { // Arrange $data = $this->createUserWithPermission([ ]); - $project = Project::factory()->forOrganization($data->organization)->make(); + $projectFake = Project::factory()->forOrganization($data->organization)->make(); Passport::actingAs($data->user); // Act - $response = $this->postJson(route('api.v1.projects.store', [$data->organization->getKey()]), $project->toArray()); + $response = $this->postJson(route('api.v1.projects.store', [$data->organization->getKey()]), [ + 'name' => $projectFake->name, + 'color' => $projectFake->color, + ]); // Assert $response->assertStatus(403); @@ -95,7 +122,6 @@ public function test_store_endpoint_creates_new_project(): void $response = $this->postJson(route('api.v1.projects.store', [$data->organization->getKey()]), [ 'name' => $project->name, 'color' => $project->color, - 'organization_id' => $project->organization_id, ]); // Assert @@ -107,6 +133,27 @@ public function test_store_endpoint_creates_new_project(): void ]); } + public function test_update_endpoint_fails_if_user_is_not_part_of_project_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'projects:update', + ]); + $otherOrganization = Organization::factory()->create(); + $project = Project::factory()->forOrganization($otherOrganization)->create(); + $projectFake = Project::factory()->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->putJson(route('api.v1.projects.update', [$data->organization->getKey(), $project->getKey()]), [ + 'name' => $projectFake->name, + 'color' => $projectFake->color, + ]); + + // Assert + $response->assertStatus(403); + } + public function test_update_endpoint_fails_if_user_has_no_permission_to_update_projects(): void { // Arrange @@ -150,6 +197,23 @@ public function test_update_endpoint_updates_project(): void ]); } + public function test_destroy_endpoint_fails_if_user_is_not_part_of_project_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'projects:delete', + ]); + $otherOrganization = Organization::factory()->create(); + $project = Project::factory()->forOrganization($otherOrganization)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.projects.destroy', [$data->organization->getKey(), $project->getKey()])); + + // Assert + $response->assertStatus(403); + } + public function test_destroy_endpoint_fails_if_user_has_no_permission_to_delete_projects(): void { // Arrange @@ -178,7 +242,7 @@ public function test_destroy_endpoint_deletes_project(): void $response = $this->deleteJson(route('api.v1.projects.destroy', [$data->organization->getKey(), $project->getKey()])); // Assert - $response->assertStatus(200); + $response->assertStatus(204); $this->assertDatabaseMissing(Project::class, [ 'id' => $project->getKey(), ]); diff --git a/tests/Unit/Endpoint/Api/V1/TimeEntryEndpointTest.php b/tests/Unit/Endpoint/Api/V1/TimeEntryEndpointTest.php new file mode 100644 index 00000000..0e692b30 --- /dev/null +++ b/tests/Unit/Endpoint/Api/V1/TimeEntryEndpointTest.php @@ -0,0 +1,478 @@ +createUserWithPermission([ + ]); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.time-entries.index', [$data->organization->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_index_endpoint_fails_if_user_has_no_permission_to_view_time_entries_for_others_but_wants_all_entries(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:view:own', + ]); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.time-entries.index', [$data->organization->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_index_endpoint_returns_time_entries_for_current_user(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:view:own', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($data->user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.time-entries.index', [$data->organization->getKey(), 'user_id' => $data->user->getKey()])); + + // Assert + $response->assertStatus(200); + $response->assertJsonPath('data.0.id', $timeEntry->getKey()); + } + + public function test_index_endpoint_fails_if_user_filter_is_from_different_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:view:all', + ]); + $user = User::factory()->withPersonalOrganization()->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.time-entries.index', [$data->organization->getKey(), 'user_id' => $user->getKey()])); + + // Assert + $response->assertStatus(422); + $response->assertJsonValidationErrorFor('user_id'); + } + + public function test_index_endpoint_returns_time_entries_for_other_user_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:view:all', + ]); + $user = User::factory()->create(); + $data->organization->users()->attach($user, [ + 'role' => 'employee', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.time-entries.index', [$data->organization->getKey(), 'user_id' => $user->getKey()])); + + // Assert + $response->assertStatus(200); + $response->assertJsonPath('data.0.id', $timeEntry->getKey()); + } + + public function test_index_endpoint_returns_time_entries_for_all_users_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:view:all', + ]); + $user = User::factory()->create(); + $data->organization->users()->attach($user, [ + 'role' => 'employee', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->getJson(route('api.v1.time-entries.index', [$data->organization->getKey()])); + + // Assert + $response->assertStatus(200); + $response->assertJsonPath('data.0.id', $timeEntry->getKey()); + } + + public function test_store_endpoint_fails_if_user_has_no_permission_to_create_time_entries(): void + { + // Arrange + $data = $this->createUserWithPermission([ + ]); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->withTags($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->postJson(route('api.v1.time-entries.store', [$data->organization->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(403); + } + + public function test_store_endpoint_creates_new_time_entry_for_current_user(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:create:own', + ]); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->postJson(route('api.v1.time-entries.store', [$data->organization->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(201); + $this->assertDatabaseHas(TimeEntry::class, [ + 'id' => $response->json('data.id'), + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + } + + public function test_store_endpoint_fails_if_user_has_no_permission_to_create_time_entries_for_others(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:create:own', + ]); + $otherUser = User::factory()->create(); + $data->organization->users()->attach($otherUser, [ + 'role' => 'employee', + ]); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->postJson(route('api.v1.time-entries.store', [$data->organization->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $otherUser->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(403); + } + + public function test_store_endpoint_creates_new_time_entry_for_other_user_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:create:all', + ]); + $otherUser = User::factory()->create(); + $data->organization->users()->attach($otherUser, [ + 'role' => 'employee', + ]); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->postJson(route('api.v1.time-entries.store', [$data->organization->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $otherUser->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(201); + $this->assertDatabaseHas(TimeEntry::class, [ + 'id' => $response->json('data.id'), + 'user_id' => $otherUser->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + } + + public function test_update_endpoint_fails_if_user_has_no_permission_to_update_own_time_entries(): void + { + // Arrange + $data = $this->createUserWithPermission([ + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($data->user)->create(); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->putJson(route('api.v1.time-entries.update', [$data->organization->getKey(), $timeEntry->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(403); + } + + public function test_update_endpoint_fails_if_user_is_not_part_of_time_entry_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:update:own', + ]); + $otherUser = $this->createUserWithPermission([ + 'time-entries:update:own', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($otherUser->organization)->forUser($otherUser->user)->create(); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->putJson(route('api.v1.time-entries.update', [$data->organization->getKey(), $timeEntry->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(403); + } + + public function test_update_endpoint_fails_if_user_has_no_permission_to_update_time_entries_for_other_users_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:update:own', + ]); + $user = User::factory()->create(); + $data->organization->users()->attach($user, [ + 'role' => 'employee', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($user)->create(); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->putJson(route('api.v1.time-entries.update', [$data->organization->getKey(), $timeEntry->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(403); + } + + public function test_update_endpoint_updates_time_entry_for_current_user(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:update:own', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($data->user)->create(); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->putJson(route('api.v1.time-entries.update', [$data->organization->getKey(), $timeEntry->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(200); + $this->assertDatabaseHas(TimeEntry::class, [ + 'id' => $timeEntry->getKey(), + 'user_id' => $data->user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + } + + public function test_update_endpoint_updates_time_entry_of_other_user_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:update:all', + ]); + $user = User::factory()->create(); + $data->organization->users()->attach($user, [ + 'role' => 'employee', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($user)->create(); + $timeEntryFake = TimeEntry::factory()->forOrganization($data->organization)->make(); + Passport::actingAs($data->user); + + // Act + $response = $this->putJson(route('api.v1.time-entries.update', [$data->organization->getKey(), $timeEntry->getKey()]), [ + 'description' => $timeEntryFake->description, + 'start' => $timeEntryFake->start->toIso8601String(), + 'end' => $timeEntryFake->end->toIso8601String(), + 'tags' => $timeEntryFake->tags, + 'user_id' => $user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + + // Assert + $response->assertStatus(200); + $this->assertDatabaseHas(TimeEntry::class, [ + 'id' => $timeEntry->getKey(), + 'user_id' => $user->getKey(), + 'task_id' => $timeEntryFake->task_id, + ]); + } + + public function test_destroy_endpoint_fails_if_user_tries_to_delete_time_entry_in_organization_that_they_does_belong_to(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:delete:all', + ]); + $otherUser = $this->createUserWithPermission([ + 'time-entries:delete:all', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($otherUser->organization)->forUser($otherUser->user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.time-entries.destroy', [$data->organization->getKey(), $timeEntry->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_destroy_endpoint_fails_if_user_tries_to_delete_non_existing_time_entry(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:delete:own', + ]); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.time-entries.destroy', [$data->organization->getKey(), Str::uuid()])); + + // Assert + $response->assertStatus(404); + } + + public function test_destroy_endpoint_fails_if_user_has_no_permission_to_delete_own_time_entries(): void + { + // Arrange + $data = $this->createUserWithPermission([ + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($data->user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.time-entries.destroy', [$data->organization->getKey(), $timeEntry->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_destroy_endpoint_fails_if_user_has_no_permission_to_delete_time_entries_for_other_users_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:delete:own', + ]); + $user = User::factory()->create(); + $data->organization->users()->attach($user, [ + 'role' => 'employee', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.time-entries.destroy', [$data->organization->getKey(), $timeEntry->getKey()])); + + // Assert + $response->assertStatus(403); + } + + public function test_destroy_endpoint_deletes_own_time_entry(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:delete:own', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($data->user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.time-entries.destroy', [$data->organization->getKey(), $timeEntry->getKey()])); + + // Assert + $response->assertStatus(204); + $this->assertDatabaseMissing(TimeEntry::class, [ + 'id' => $timeEntry->getKey(), + ]); + } + + public function test_destroy_endpoint_deletes_time_entry_of_other_user_in_organization(): void + { + // Arrange + $data = $this->createUserWithPermission([ + 'time-entries:delete:all', + ]); + $user = User::factory()->create(); + $data->organization->users()->attach($user, [ + 'role' => 'employee', + ]); + $timeEntry = TimeEntry::factory()->forOrganization($data->organization)->forUser($user)->create(); + Passport::actingAs($data->user); + + // Act + $response = $this->deleteJson(route('api.v1.time-entries.destroy', [$data->organization->getKey(), $timeEntry->getKey()])); + + // Assert + $response->assertStatus(204); + $this->assertDatabaseMissing(TimeEntry::class, [ + 'id' => $timeEntry->getKey(), + ]); + } +}