Skip to content

Releases: Hi-Folks/rando-php

v0.3.0

06 Aug 20:32
3d4b978
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.0...v0.3.0

Special Characters

01 Jul 06:30
Compare
Choose a tag to compare

Add

  • Add special characters (specialCharacters() method) in Randomize::char() and Randomize::chars().
    Special characters are: !"#$%&'()*+,-./:;<=>?@[]^_`{|}~

Example:

Randomize::chars(20)->specialCharacters()->alpha()->generate();

Random Chars

29 Jun 19:46
Compare
Choose a tag to compare

Add

  • Add Randomize::chars() for creating string (it is a kind of shortcut for Sequence class);

Refactor Chars and Sequence

27 Mar 08:01
Compare
Choose a tag to compare

Add

  • Adding Integer constructor with min and max
  • Adding alphaLowerCase() and alphaUpperCase() methods Sequence (Chars);

Change

  • Refactor Char model
  • change GitHub Actions workflow adding matrix for PHP 8, 7.4, 7.3

Add snap() method

23 Mar 06:23
Compare
Choose a tag to compare

With this small release 2 "shortcut" methods are added: snap() and snapKey().
The use case is: you have an array of elements ["first", "second", "third"] and you want to extract (random) just 1 element.
You don't want as output an array with 1 element, but you want that element.

For example before this release with this input array ["first", "second", "third"] with Draw class you could obtain: ["second"] (an array). With snap you could obtain "second".

Add

  • Add snap() and snapKey() in Draw class. You can retry 1 item from array

PHP8 compatibility

13 Nov 21:45
Compare
Choose a tag to compare

Add

  • PHP 8 compatibility
  • Add lower() method to Char for generating lower case chars: Randomize::char()->alpha()->lower()->generate() (thanks to @xanaDev);
  • Add upper() method to Char for generating upper case chars: Randomize::char()->alpha()->upper()->generate() (thanks to @xanaDev);

Change

  • Register models in a property and load them with magic functions (thanks to @marcio-adue)

Fix alphanumeric

21 Oct 15:52
969d3e6
Compare
Choose a tag to compare
Merge pull request #67 from Hi-Folks/fix/64-merge-arrays

v0.1.5

Random Geo stuff - HACKTOBERFEST 2020 - 2

14 Oct 07:19
Compare
Choose a tag to compare

Add

  • Add Latitude / Longitude coordinates random generation (as object , as array as number). Thanks to @vrabe
  • Add Makefile to launch: unit tests, phpstan (level 6), phpcs (PSR12)
  • Adding more tests for DateTime

Change

  • Set min and max default for date time (first day of the current year, last day of the current year), thanks to @armsasmart

Documentation

HACKTOBERFEST 2020 - 1

07 Oct 18:03
Compare
Choose a tag to compare

0.1.3 - 2020-10-07 HACKTOBERFEST 2020 - 1 🚀

Add 🎉

  • Add Char Model, now you can generate random chars (numeric, alphabetical, alphanumeric...). Thanks to @parnus01
  • Add DataTime Model, now you can generate a random date, thanks to @rebelchris
  • Add Float Model, now you can generate a random float, thanks to @jirkavrba
  • Add Sequence Char, now you can generate a sequence of chars, thanks to @bitasterisk
  • Add toString method in order to have a concatenated sequence of chars, thanks to @paresh27

Change 💪

CI/CD 🏗️

  • Add cache for vendors and PHP packages
  • Add PHP Linter for 7.1, thanks to @Anita-ihuman

Documentation examples 📚

  • Add example/RandomInteger.php file, thanks to @davidribeiro
  • Add example/RandomBoolean.php, thanks to @rebelchris
  • Add example/RandomDate.php, thanks to @rebelchris
  • Add example/RandomFloat.php, thanks to @jirkavrba
  • Add examples/RandomSequenceChar.php, thanks to @xanaDev
    In readme file:
  • Add range usage, thanks to @sam0hack
  • Add generate char, thanks to @Zuruckt

noDuplicates() and preserveKeys

22 Jul 21:17
Compare
Choose a tag to compare

Add

  • preserveKeys() during drawing sample from an associative array
  • added some test in order to have coverage 100%

Change

  • method unique(), allowDuplicates(), noDuplicates() for sequence generation;