Skip to content

Releases: tolgahanacar/php-rest-api

v3.0.0

15 Aug 07:23
84a3f5d
Compare
Choose a tag to compare

Update index.php

  • Made compatible for PHP 8.2 and above.
  • It has been rewritten with a more modern and understandable definition.

Update functions.php

  • Type Determination: PHP 8.2's type determination features (int, string, void) were used. This makes the code more reliable.
  • Abbreviated Logical Expressions: ?? With the operator, if a valid status code is not found for $code, a 500 error code is returned.
  • Cleaner and Comprehensive Functions: Function names and logic are the same, but written in a more concise and effective way.
  • Minify: The code was cleared of unnecessary spaces and lines, thus gaining a more compact structure.

Update connect.php

  • PDO Settings via Array: PDO settings are passed as an array directly in the PDO constructor instead of setAttribute. This makes for shorter, cleaner writing.
  • Exit Function Usage: exit is used instead of die, reflecting a more modern PHP usage.
  • Default Retrieval Mode: PDO::FETCH_OBJ is set as the default retrieval mode so data will be returned as object. This makes your code a little - cleaner and makes data manipulation easier (optional).

v2.0.0

29 Sep 10:30
Compare
Choose a tag to compare
  • Changes to database columns
  • SQL commands are arranged according to database changes.
  • PUT, POST methods have been updated and harmonized.
  • Controls were provided according to the methods for security or chronic errors.
  • Adjusted the server status codes to be returned according to the error messages.

v1.0.0

28 Sep 19:07
4247e6c
Compare
Choose a tag to compare
Delete users.sql :+1:

Delete users.sql :+1: